2017-04-08 30 views
0

我已建成使用this pyimagesearch guide的OpenCV和opencv_contrib,并得到一个属性错误:FaceRecognizer错误

AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'

在试图签opencv_contrib这似乎是这个问题,这是我的终端显示:

git checkout 3.2.0 
Note: checking out '3.2.0'. 

You are in 'detached HEAD' state. You can look around, make experimental 
changes and commit them, and you can discard any commits you make in this 
state without impacting any branches by performing another checkout. 

If you want to create a new branch to retain commits you create, you may 
do so (now or later) by using -b with the checkout command again. Example: 

    git checkout -b <new-branch-name> 

HEAD is now at 86342522... Merge pull request #701 from LaurentBerger:DericheFilter 

考虑到我对git和稀缺opencv知识的知识为零,如果可能是属性错误的问题,我应该如何解决分离的头部问题?

+0

你不需要担心,因为您不打算直接贡献这个contrib回购,用于构建您的OpenCV代码,对我来说这似乎很好 – ZdaR

+0

您是否有指向此指南的链接,或者它是否花费某些东西? –

+0

@uav添加了链接。 – momo

回答

0

Considering the fact that I have zero knowledge of git and scarce knowledge of opencv, what should I do to fix the detached head if that could be the problem for the attribute error?

你是分离的头,因为你有签出一个标签名
标签指向的提交不是最新提交,因此您处于分离的HEAD中。

这里了解如何“修理”它 How to move HEAD back to a previous location? (Detached head)

,或者如果你只是想在这个标签工作,以便检查出来的新的分支为帮助您展示

# check it out as master 
git checkout -b <new-branch-name>