inference.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:party-pi 作者: JustinShenk 项目源码 文件源码
def load_detection_model(model_path='/usr/local/opt/opencv3/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml'):
    if not os.path.exists(model_path):
        # Try alternative file path
        local_cascade_path = 'face.xml'
        if not os.path.exists(local_cascade_path):
            raise NameError('File not found:', local_cascade_path)
        model_path = local_cascade_path
    detection_model = cv2.CascadeClassifier(model_path)
    return detection_model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号