Comments (5)
'label' is two value-> (1, 0.0)
first value is subjects label text count ,
second is.. I don't know.
so I change like this -> label_text = subjects[label[0]]
it's work.
from opencv-face-recognition-python.
Latest versions of OpenCV's predict function returns a (label, confidence)
tuple. The first value is the label of the subject identified and the second value is the confidence score for that subject. You can use the confidence to filter out low confidence images as unknown subjects. So @Clanatia is right
changing following
label_text = subjects[label]
to
label_text = subjects[label[0]]
should work fine on OpenCV versions which give this error.
from opencv-face-recognition-python.
AttributeError Traceback (most recent call last)
in ()
----> 1 face_recognizer = cv2.face.createLBPHFaceRecognizer()
2
AttributeError: module 'cv2' has no attribute 'face'
Why is this problem occurring?
from opencv-face-recognition-python.
AttributeError Traceback (most recent call last)
in ()
----> 1 face_recognizer = cv2.face.createLBPHFaceRecognizer()
2AttributeError: module 'cv2' has no attribute 'face'
Why is this problem occurring?
Use this instead:
face_recognizer = cv2.face.LBPHFaceRecognizer_create()
from opencv-face-recognition-python.
AttributeError Traceback (most recent call last)
in ()
----> 1 face_recognizer = cv2.face.createLBPHFaceRecognizer()
2AttributeError: module 'cv2' has no attribute 'face'
Why is this problem occurring?
Try to install opencv using: python -m pip install --user opencv-contrib-python
And then try cv2.face.HBPHFaceRecognizer_create()
from opencv-face-recognition-python.
Related Issues (20)
- problem in recognizing unknown faces HOT 1
- is all the code in the same script?
- How to get the corresponding LBP image?
- Want to know more about the teory HOT 3
- AttributeError: 'NoneType' object has no attribute 'copy' HOT 3
- OpenCV-Face-Recognition-Python.py, Line 223, in <Module> HOT 2
- can't install opencv-contrib-python HOT 1
- Similarity scores
- Testing with other imagees
- should return some value like match found or something after completing the prediction.
- should return some value like match found or something after completing the prediction.
- cv2.error: OpenCV(3.4.2) /opt/concourse/worker/volumes/live/9523d527-1b9e-48e0-7ed0-a36adde286f0/volume/opencv-suite_1535558719691/work/opencv_contrib-3.4.2/modules/face/src/eigen_faces.cpp:72: error: (-210:Unsupported format or combination of formats) In the Eigenfaces method all input samples (training images) must be of equal size! Expected 8100 pixels, but was 6561 pixels. in function 'train'
- AttributeError: 'NoneType' object has no attribute 'copy'
- error: (-215:Assertion failed) s >= 0 in function 'cv::setSize' HOT 1
- AttributeError: module 'cv2.cv2' has no attribute 'face' HOT 2
- At least two classes are needed to perform a LDA
- Error no attribute 'face' HOT 1
- Why this happened?: SystemError: <class 'cv2.CascadeClassifier'> returned a result with an error set
- Model Training HOT 1
- Same name (ID) on different faces
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-face-recognition-python.