FaceRecognizer | Face Recognition Application
kandi X-RAY | FaceRecognizer Summary
kandi X-RAY | FaceRecognizer Summary
Face Recognition Application
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 FaceRecognizer
FaceRecognizer Key Features
FaceRecognizer Examples and Code Snippets
Community Discussions
Trending Discussions on FaceRecognizer
QUESTION
I'm trying to run this code but it did not because I am not able to download this file from GitHub. Is there anyone who knows how I can download this file?
This is the link to the file with the filename face-trainner.yml
: https://github.com/codingforentrepreneurs/OpenCV-Python-Series/tree/…
I'm getting this error when running my program:
...ANSWER
Answered 2021-Jun-12 at 21:14Go to the main section of the GitHub repository: https://github.com/codingforentrepreneurs/OpenCV-Python-Series
- Press the code button and then download as zip.
- Unzip the file in your downloads.
- Navigate to
src/recognisers
and the fileface-trainner.yml
should be there. - Use that file how you want in your project (discard of the rest if you have no need for it).
Also make sure that you have typed the correct file name in your program with the two 'n's (face-trainner.yml
not face-trainer.yml
)
QUESTION
I'm following an older tutorial on face recognition based on OpenCV in C++ and have an error I can't resolve. The relevant code snippet:
...ANSWER
Answered 2020-Sep-23 at 16:55According to the official document,
QUESTION
I am trying to pass a value from C++ header file named recognizer.h
to Android through my JNI implementation in jni_face_rec.cpp
.
recognizer.h
ANSWER
Answered 2020-Jan-15 at 12:43In the absence of further information I assume you want to preserve the vector-of-matrices structure as a float[][]
where every float[]
corresponds to one matrix.
QUESTION
In my app I'm trying to do face recognition on a specific image using Open CV, here first I'm training one image and then after training that image if I run face recognition on that image it successfully recognizes that trained face. However, when I turn to another picture of the same person recognition does not work. It just works on the trained image, so my question is how do I rectify it?
Update: What i want to do is that user should select image of a person from storage and then after training that selected image i want to fetch all images from storage which matches face of my trained image
Here is my activity class:
...ANSWER
Answered 2019-Nov-18 at 10:25If I understand correctly, you're training the classifier with a single image. In that case, this one specific image is everything the classifier will be able to ever recognise. You would need a noticeably bigger training set of pictures showing the same person, something like 5 or 10 different images at the very least.
QUESTION
I am working on Face Recognition java project using OpenCV 3.4.0. For that using createFisherFaceRecognizer(0,1500) method but OpenCV doesn't contain this class and method. Does anyone know about OpenCV? Please let me know how to use it.
These are imports
...ANSWER
Answered 2018-Jul-06 at 08:44There is another thing called OpenCV-contrib that is required to run the following Face class .
This is the GitHub repo link . Read the README.md
Follow the given steps : -
Download the original OpenCV repo and the contrib repo from GitHub.
Go to opencv_contrib/modules/face and open cmakeLists.txt with any editor . Now find the line that begins with ocv_define_module and add the word 'java' (no quotes) in the end .
[Looks like:-
ocv_define_module(face opencv_core opencv_imgproc opencv_objdetect WRAP python java)]
3.Compile using cmake using this : cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=path to opencv_contrib
Use the generated jar!
PS:In windows , I don't think the default .exe opencv installer contains the face classes , so its better to build with cmake .
QUESTION
The picture linked below shows the specific exception I'm getting. I'm not quite sure why I'm having this particular issue as I've built everything in the same directory, so the library file is there. From what I understand this has something to do with what I'm returning to my main method from my c++ function.
What I'm essentially trying to do is pass the name (printId) of the recognized person, as a string, from my c++ function to java.
Picture of command line:
Here's my C++ code:
...ANSWER
Answered 2018-Nov-18 at 11:16Try regenerating the header file, it looks like you changed your class name in the meantime and the name is no longer up to date. The name I get from that java class is:
QUESTION
I'm working on a university project combining MQTT and Face recognition, using a raspberry pi. First of all I want to say that face recognition works normally when it's being run on its own but I have something that bugs me when applying it with MQTT.
Inside the Try section, when a person is being recognized or unknown it publishes really fine every 3 secs. The strange thing is that if I put my hand in front of the camera or if I get out of range, it keeps on sending the ID of the last person it had recognized.
I want it either do nothing or publish none.
Any idea or suggestion to fix this? Thanks in advance
EDIT 1: Basically as I figured out, it has to do more with the face recognition part. When using just a face recognition code using opencv it runs smoothly. But the thing complicates when I put my hand in front of the camera or go away, because the capture freezes at the last thing it sees so it keeps on printing/publishing the same thing. Haven't figured out a way to avoid this yet. Any help would be appreciated
...ANSWER
Answered 2018-Sep-19 at 19:52From the documentation on mqtt clients, you seem to be misusing the client.loop_forever()
method.
http://www.steves-internet-guide.com/loop-python-mqtt-client/
TLDR
- Use
client.loop(timeout)
in a loop to control processing of updates. - Use
client.loop_start()
starts a new thread which handles updates for you. - Use
client.loop_forever()
to block and process updates.
Since you have already called client.loop_start()
, you don't need to call loop_forever()
. Removing those calls from your code should resolve the issue.
Side note: your time.sleep(3)
call could be moved to the end of the loop, since it should happen no matter which conditional path it takes.
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'm working on doing some Face, Gender, and Age detection using OpenCV. I have a bunch of images I use to train the models, Essentally I currently have the following:
...ANSWER
Answered 2018-Apr-26 at 13:09CascadeClassifier::detectMultiScale
function is used for object detection. It returns a variable of type std::vector
which contains bounding rectangles of detected objects.
FaceRecognizer::predict
function is used for object classification. It returns the class label of input image and the confidence with which the object is predicted.
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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FaceRecognizer
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