Recognizer.read('trainer / trainer.yml)

时间:2019-10-02 10:01:12

标签: python opencv cv2

任何人都可以告诉我如何解决此问题。

recognizer.read('trainer/trainer.yml')
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv_contrib\modules\face\src\facerec.cpp:61: error: (-2:Unspecified error) File can't be opened for reading! in function 'cv::face::FaceRecognizer::read'

recognizer.read('trainer / trainer.yml') cv2.error:

  

OpenCV(4.1.0)   C:\ projects \ opencv-python \ opencv_contrib \ modules \ face \ src \ facerec.cpp:61:   错误:(-2:未指定错误)无法打开文件进行读取!在   函数'cv :: face :: FaceRecognizer :: read'

1 个答案:

答案 0 :(得分:0)

您缺少文件'trainer / trainer.yml' 您将需要下载它并将其放在路径/ trainer /