我是新手,目前正在Google合作实验室试用Python笔记本https://github.com/TessFerrandez/research-papers/tree/master/facenet。
我添加了
!pip install face-recognition
!git clone https://github.com/TessFerrandez/research-papers.git
%cd research-papers/facenet
在笔记本的开头,以便我可以导入正确的实用程序。
但是,在以下单元格之一中,我无法运行代码。我收到此错误消息:
RuntimeError
Traceback (most recent call last)
ipython-input-14-45bae69bfbbe in <module>()
15 # Initialize the OpenFace face alignment utility
---> 16 alignment = AlignDlib('models/landmarks.dat')
/content/research-papers/facenet/research-papers/facenet/align.py in __init__(self, facePredictor)
88 self.detector = dlib.get_frontal_face_detector()
---> 89 self.predictor = dlib.shape_predictor(facePredictor)
RuntimeError: Unable to open models/landmarks.dat
您知道在哪里可以找到model / landmarks.dat,以便AlignDlib不会引发错误吗?
我是否必须将openface安装到google colabortary或从某个位置上传模型?
您可以使用此代码下载并解压缩必要的文件。
!wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
!bunzip2 "shape_predictor_68_face_landmarks.dat.bz2"