def getJsons(imgPath, maskPath, savePath, yamlPath=''):
    '\n    imgPath: origin image path \n\n    maskPath : mask image path \n\n    savePath : json file save path \n\n    \n    >>> getJsons(path-to-your-imgs,path-to-your-maskimgs,path-to-your-jsonfiles) \n\n    '
    logger.info('currently, only *.jpg supported')
    if os.path.isfile(imgPath):
        getMultiShapes.getMultiShapes(imgPath, maskPath, savePath, yamlPath)
    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.getMultiShapes(i, i_mask, savePath, yamlPath)
            else:
                logger.warning('corresponding mask image not found!')
                continue
    else:
        logger.error('input error. got [{},{},{},{}]. file maybe missing.'.format(imgPath, maskPath, savePath, yamlPath))
    logger.info('Done! See here. {}'.format(savePath))
imgPath: origin image path 

maskPath : mask image path 

savePath : json file save path 


>>> getJsons(path-to-your-imgs,path-to-your-maskimgs,path-to-your-jsonfiles)
def getJsons(imgPath, maskPath, savePath, yamlPath=):
    '\n    imgPath: origin image path \n\n    maskPath : mask image path \n\n    savePath : json file save path \n\n    \n    >>> getJsons(path-to-your-imgs,path-to-your-maskimgs,path-to-your-jsonfiles) \n\n    '
    logger.info('currently, only *.jpg supported')
    if os.path.isfile(imgPath):
        getMultiShapes.getMultiShapes(imgPath, maskPath, savePath, yamlPath)
    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.getMultiShapes(i, i_mask, savePath, yamlPath)
            else:
                logger.warning('corresponding mask image not found!')
                continue
    else:
        logger.error('input error. got [{},{},{},{}]. file maybe missing.'.format(imgPath, maskPath, savePath, yamlPath))
    logger.info('Done! See here. {}'.format(savePath))