face_recognizer | Thử làm hệ thống chấm công bằng khuôn mặt bằng | Machine Learning library
kandi X-RAY | face_recognizer Summary
kandi X-RAY | face_recognizer Summary
Thử làm hệ thống chấm công bằng khuôn mặt bằng haarcascade detector và LBPH Face Recognizer. Mì AI - Học AI theo các mì ăn liền! www.ainoodle.tech.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of face_recognizer
face_recognizer Key Features
face_recognizer Examples and Code Snippets
Community Discussions
Trending Discussions on face_recognizer
QUESTION
Hello StackOverFlow Team: I built a model based on (Vgg_Face_Model) with weights loaded (vgg_face_weights.h5). Note that I use tensorflow-gpu = 2.1.0 , and keras=2.3.1 , with Anaconda 3 create it as interpreter and used with pycharm But the code shows an error in the part :
...ANSWER
Answered 2021-May-24 at 09:55from tensorflow.python.keras.backend import set_session
sess = tf.Session()
#This is a global session and graph
graph = tf.get_default_graph()
set_session(sess)
#now where you are calling the model
global sess
global graph
with graph.as_default():
set_session(sess)
input_descriptor = [model.predict(face), img]
QUESTION
After referring to some Stack Overflow answers I did pip install opencv-contrib
, still I am getting those errors.
code for training:
...ANSWER
Answered 2019-Apr-08 at 23:28Try update OpenCV with
QUESTION
I am writing a facial recognition program and I keep getting this error, and I am just very confused I see no other examples on the web where people include ranges when converting to UMat
...ANSWER
Answered 2019-Jan-22 at 07:08I think it has something to do with datatype of array given as input to cv2 functions. I too got the error and when i did arr.dtype
it showed as float16 and when converted to float32, the error got solved.
QUESTION
I am writing a facial recognition program and I keep getting this error when I try to train my recognizer
...ANSWER
Answered 2019-Jan-21 at 13:53Solution - labels should be list of integers, and you should use numpy.array(labels)
(or np.array(labels)
).
Dummy example to check an error absence:
QUESTION
I am creating a face recognition system using Python and OpenCV on these versions:
- Python 3.6.2 :: Anaconda custom (64-bit)
- Anaconda 4.3.23
- OpenCV 3.3.0
When I try to train the face recognizer:
...ANSWER
Answered 2017-Sep-18 at 21:41The Menpo project does not have an installer for OpenCV 3.3. The Menpo project is up to 3.1 on macOS and Windows, and 3.2 on Linux. See the Anaconda package for that description and also the list of files for the installer versions. Actually, you can check out the GitHub repo for Menpo's OpenCV3 build and grab the files yourself. You can change the build files to suit your system if needed.
I'm not sure if your pip
attempt includes a typo or not---the correct PyPI package wheel
file with the contrib module is opencv_contrib_python
not opencv_python+contrib
, as shown at PyPI. Note that if you're not using Windows the GUI features of OpenCV will not work with the pip
installer, including imshow()
and other similar features.
You'd be better served just removing and reinstalling fresh with the contrib modules instead of trying to build them in later.
QUESTION
I made a working face recognition program but from time to time it can: 1) Not detect a face / detect an extra non face as a face. 2) When it gets a familiar face he might recognize that it’s a new person / recognize that a new unfamiliar face is someone else.
These two problems of false positive and true negatives are due to the constants such as the in the cascade.detectMultiScale
parameters: scaleFactor, minNeighbors, minSize, maxSize.
And in the face_recognizer the num_components, threshold.
So my question is how can I find the optimal values for these parameters?
...ANSWER
Answered 2019-Jan-08 at 09:16Experimentally, you have to do a grid search. So if you have the labels (correct values of the boxes etc.) you can do a grid search in a way that you define a set of hyperparameters that you want to finetune and check every possible combination of them to find the best one.
For example, in the face_recognizer
you can try and experiment with threshold like this:
QUESTION
Here is my code below:
/* * Copyright (c) 2011. Philipp Wagner . * Released to public domain under terms of the BSD Simplified license. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the organization nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * See http://www.opensource.org/licenses/bsd-license */
...ANSWER
Answered 2018-Apr-29 at 18:21You have to create the model so
QUESTION
I know there is lot of questions about it but I still can't find a useful answer.
I have anaconda installed with python 2 and i have builded my own version of opencv with cmake and visual studio, how can i connect my anaconda python2 to opencv?
When I just copy cv2.pyd
from opencv
into python, I can import cv2
but cv2.face
is missing; what can I do? I need that cv2.face
, i am working on face recognition project.
error:
...ANSWER
Answered 2018-Feb-22 at 08:10You have to compile opencv along with contrib modules, which has the face submodule. The cmake option to do this is -D OPENCV_EXTRA_MODULES_PATH=/modules
. You can download opencv contrib here
QUESTION
I'm using the facial recognition from videos by Philipp Wagner ,i updated the code to work with opencv 3.2 ,i had after that a real hard time to create the appropriate face database ,but then my question is how can i give a value for the unknown persons?So far when i run my code it gives the unknown person a value from my database i'am using "0" for myself and "1" for another person. how can i set it to be "-1" for example for unknown subjects ? Here is my code so far, I tried to use threshold but didn't get any results.
...ANSWER
Answered 2017-Apr-05 at 06:26Read up on this document: Fisher Face Recognizer. Read over every method you are using. This should give you the information you need to troubleshoot.
From the document on model->set
: If the distance to the nearest neighbor is larger than the threshold, this method returns -1
. In your case, you're not getting any -1
's returned, meaning that your threshold may set to high which will allow faces that are not similar to return a positive match.
It looks like you have not set your threshold variable. Try setting your threshold to a lower value using: model->set("threshold", DOUBLE_VALUE_HERE);
.
A threshold of 0.0
would almost always return a -1
as images would always have slight differences making their distance > 0.0
. Experiment with different threshold values and see if that gives you the result you're looking for. I'd recommend starting with a value of 5.0
: model->set("threshold", 5.0);
and working up or down from there.
QUESTION
Hi,Everyone We are working on a face recognition application when ı run the code below, as you can see in the photo it works only in one face(red square) it doesnt scan other faces in the traning-data ı guess my predict function only run one time. dont in the loop.
Processed Image : LINK
...ANSWER
Answered 2018-Jan-04 at 10:39Why are you passing the original image to the predict()
function?
Once you've detected the two faces, you should pass each of them (extracted from the original image using OpenCV functions) to the predict function.
In this way your algorithm will work and be faster.
Good luck!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install face_recognizer
You can use face_recognizer like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page