facerec-python | Personal Graduation Project - Face Recognition
kandi X-RAY | facerec-python Summary
kandi X-RAY | facerec-python Summary
Personal Graduation Project - Face Recognition Based on Raspberry Pi, OpenCV and Python Language
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Setup the UI
- Translate the UI
facerec-python Key Features
facerec-python Examples and Code Snippets
Community Discussions
Trending Discussions on facerec-python
QUESTION
I'm new using opencv and python, my project its about a smarthome.
I managed to install opencv on a raspberrypi and using a webcam.
My program will work on the following three scenarios. 1.A person enters the room, detects face and person, sends message "Dad is in room 1." 2.A person enters the room, detects face but not person, sends message "Unknown person is in room 1" 3. No one is in the room, send a message "No one is in room 1"
Scenarios 1 and 2 I have idea how to solve them, but where I am stuck is in the esceanrio 3. I tried to save the name of the detected person in a variable, if this is empty should send the message, but it has not worked for me.
The code I am using is the following, the problem I have is at the end of the code:
...ANSWER
Answered 2017-Apr-21 at 15:00If there are no faces detected in the room, your code does not enter the for i in range(len(faces))
loop, which by the way could be simplified to for i in faces
.
Thus, an else
at the end of your for
loop solves your problem:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install facerec-python
You can use facerec-python 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