我使用this pyimagesearch guide构建了opencv和opencv_contrib,但是出现了属性错误:
AttributeError:' module'对象没有属性' 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 :(得分:0)
考虑到我对git和opencv的稀缺知识一无所知,如果这可能是属性错误的问题,我应该怎么做才能修复分离的头?
由于您已签出了代码名称,因此您处于独立的HEAD状态 标记指向的提交不是最新的提交,因此您处于分离的HEAD中。
在这里阅读如何解决&#34;修复&#34;它 How to move HEAD back to a previous location? (Detached head)
或者如果您只想处理此标记,请将其作为新分支检查,如帮助显示
# check it out as master
git checkout -b <new-branch-name>