'cv2.cv2' has no attribute 'face'Attribute error while using opencv for face recognitionOpen cv face recognition pythonOpenCV's extra module cv2.face is not knownOpenCV: AttributeError: module 'cv2' has no attribute 'face'cv2.face' has no attribute 'LBPHFaceRecognizerAttributeError: 'module' object has no attribute 'face' error even after installing opencv-contribAttributeError: module 'cv2.cv2' has no attribute 'bgsegmAttribute Error: MultiTracker_create() Not Found in cv2 on Raspberry PiHow do I import cv2AttributeError: module 'cv2.cv2' has no attribute 'samples'

Why could the Lunar Ascent Engine be used only once?

Find the values of U, V, C based on the given relationship...useful for upcoming puzzles

Is my company merging branches wrong?

Does the Aboleth have expertise in history and perception?

Parse a C++14 integer literal

Have I found a major security issue with login

Why is so much ransomware breakable?

Expand a hexagon

Can a problematic AL DM/organizer prevent me from running a separate AL-legal game at the same store?

Are there any crystals that are theoretically possible, but haven't yet been made?

Would a "ring language" be possible?

Who is frowning in the sentence "Daisy looked at Tom frowning"?

What does it mean for a program to be 32 or 64 bit?

Warped chessboard

In Dutch history two people are referred to as "William III"; are there any more cases where this happens?

How do I unravel apparent recursion in an edef statement?

How can sister protect herself from impulse purchases with a credit card?

Would it be possible to set up a franchise in the ancient world?

Head-internal relative clauses

FIFO data structure in pure C

What does this 'x' mean on the stem of the voice's note, above the notehead?

Can't think of a good word or term to describe not feeling or thinking

Does science define life as "beginning at conception"?

Windows reverting changes made by Linux to FAT32 partition



'cv2.cv2' has no attribute 'face'


Attribute error while using opencv for face recognitionOpen cv face recognition pythonOpenCV's extra module cv2.face is not knownOpenCV: AttributeError: module 'cv2' has no attribute 'face'cv2.face' has no attribute 'LBPHFaceRecognizerAttributeError: 'module' object has no attribute 'face' error even after installing opencv-contribAttributeError: module 'cv2.cv2' has no attribute 'bgsegmAttribute Error: MultiTracker_create() Not Found in cv2 on Raspberry PiHow do I import cv2AttributeError: module 'cv2.cv2' has no attribute 'samples'






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















After following this tutorial to install opencv on my raspberry pi, I was greeted with this error when I run a face recognition code:




File "03_face_recognition.py", line 15, in
recognizer = cv2.face.LBPHFaceRecognizer_create()
AttributeError: module 'cv2.cv2' has no attribute 'face'




Like many articles, I tried



pip install opencv-python
pip install opencv-contrib-python


as well as updating opencv-python and contrib but none worked for me. How do I solve this problem?










share|improve this question



















  • 1





    Could you post your code?

    – nathancy
    Mar 24 at 1:47











  • I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

    – Harold Ng
    Mar 24 at 5:19

















0















After following this tutorial to install opencv on my raspberry pi, I was greeted with this error when I run a face recognition code:




File "03_face_recognition.py", line 15, in
recognizer = cv2.face.LBPHFaceRecognizer_create()
AttributeError: module 'cv2.cv2' has no attribute 'face'




Like many articles, I tried



pip install opencv-python
pip install opencv-contrib-python


as well as updating opencv-python and contrib but none worked for me. How do I solve this problem?










share|improve this question



















  • 1





    Could you post your code?

    – nathancy
    Mar 24 at 1:47











  • I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

    – Harold Ng
    Mar 24 at 5:19













0












0








0








After following this tutorial to install opencv on my raspberry pi, I was greeted with this error when I run a face recognition code:




File "03_face_recognition.py", line 15, in
recognizer = cv2.face.LBPHFaceRecognizer_create()
AttributeError: module 'cv2.cv2' has no attribute 'face'




Like many articles, I tried



pip install opencv-python
pip install opencv-contrib-python


as well as updating opencv-python and contrib but none worked for me. How do I solve this problem?










share|improve this question
















After following this tutorial to install opencv on my raspberry pi, I was greeted with this error when I run a face recognition code:




File "03_face_recognition.py", line 15, in
recognizer = cv2.face.LBPHFaceRecognizer_create()
AttributeError: module 'cv2.cv2' has no attribute 'face'




Like many articles, I tried



pip install opencv-python
pip install opencv-contrib-python


as well as updating opencv-python and contrib but none worked for me. How do I solve this problem?







opencv raspberry-pi face-recognition cv2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 19:27









ingvar

2,0751718




2,0751718










asked Mar 23 at 18:33









Harold NgHarold Ng

11




11







  • 1





    Could you post your code?

    – nathancy
    Mar 24 at 1:47











  • I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

    – Harold Ng
    Mar 24 at 5:19












  • 1





    Could you post your code?

    – nathancy
    Mar 24 at 1:47











  • I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

    – Harold Ng
    Mar 24 at 5:19







1




1





Could you post your code?

– nathancy
Mar 24 at 1:47





Could you post your code?

– nathancy
Mar 24 at 1:47













I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

– Harold Ng
Mar 24 at 5:19





I fixed it by installing cv2 directly on my RPi rather than on a virtual environment. Thanks!

– Harold Ng
Mar 24 at 5:19












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55317092%2fcv2-cv2-has-no-attribute-face%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55317092%2fcv2-cv2-has-no-attribute-face%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴