DEV Community

Cover image for How to automate attendance record with face recognition, Python and React

How to automate attendance record with face recognition, Python and React

Berge Maxim on October 16, 2019

Taking attendance is a rather boring task. Let's see how we can automate this with artificial intelligence in python and a nice user interface in...
Collapse
 
alilynne profile image
Ali Thompson

You really ought to put a disclaimer about how this shouldn't actually be used yet in production. Facial recognition systems just are not accurate and disproportionately affect people of color, especially black people, in harmful ways. I also didn't see anything about getting consent from people about having their faces scanned and placed into a database. Please think about including this information so that people can make ethical decisions.

Collapse
 
graphtylove profile image
Berge Maxim

Yes, I understand your point, you're right I'll do it.
I didn't knew it for the colour people, I'll double check that too!

Collapse
 
haiderkhalil0000 profile image
Haider Khalil

Hello sir! can you share your code with me only for educational purpose as i'm student learning Artificial Intelligence i will only use the source code for learning my email is "haiderkhalil0000@gmail.com" i shall be very thankful to you on this favor.

Collapse
 
mburszley profile image
Maximilian Burszley

Is there consent somewhere if this system is in use on registration for an event? Feels like a major invasion of privacy to be storing images of people associated with their identity.

Collapse
 
graphtylove profile image
Berge Maxim

You can't store image of people withour their consent. The usage can be in a school to automate attendance record for the teacher in a classroom for exemple. But in this case, parents have to consent (at least in Belgium).
If you want to know more about it, I advise you to check with your country law, it can depend.

Collapse
 
byrro profile image
Renato Byrro

I believe they actually can.

What you're saying is they should not or are not legally allowed. That's different. When the government itself is the offender, it's kinda difficult to think citizens can rely on... err... the Government to enforce correction.

But if developers won't implement it, politicians and bureaucrats can't wreak havoc a nation's privacy.

Collapse
 
shebl_albarazi profile image
shebl Albarazi

Dear Maxim...
Highly appreciate what you have done you and your colleagues...
I am trying to finilize a robust attendance system, frankly I am new to programming from networking background...,mcse,Cisco.....
I built a system following your codes ,but I am facing two major things
1- How to display the video on the local host Reactjs....the connection is refused (I am using raspberry pi with its camera)
2-users data base needs to be built with postures...I didn't successed to do it ..I don't have the exact columns and their names, like time,date ,arrival time ...
Appreciate your help on those two major point ......all the best
Shebl albarazi
Shebl.barazi@gmail.com

Collapse
 
srinivasav22 profile image
Srinivasa V • Edited

Hi Berge Maxim,

Your project was awesome

while i tried to run code by running app.py i am getting an error is key Error : Database USer
app.py line 21 in and and line 679

could you please help me how to run the code

Thanks in advance

Srinivasa V

Collapse
 
codinghamster12 profile image
coding-hamster

hey, great project! but I have one question, are you sure this model is accurate, like I tried creating my project the same way, but like when I use the webcam to identify multiple people in one frame, it keeps changing the bounding boxes labels, and that way attendance for more than one people gets marked, because the labels of boxes keep changing. i tried using more than one image, like 30 images for each person but still the same problem, can you help me understand why?

Collapse
 
deesphe profile image
Sphe

Hi Maxim,

I'd like to talk to you about this project of yours; if you have time, please send me an Email at : sphe.kay@gmail.com
It'd really assist me in the project I'm currently doing, I hope to hear from you. Thank you.

Regards,
Sphe

Collapse
 
iambudi profile image
I am Budi

Thanks for the post. I am wondering if i have selfie photo on my phone and show it to the attendance camera will it recognize my face?

Collapse
 
graphtylove profile image
Berge Maxim

Yes. To face this problem, when a face is detected, we take a screenshot of the face so the admin can verify manually.

Collapse
 
ccerocks profile image
CCERocks

Hi, how hard to make double authenticity with this script.. i mean.. face recognition is 1 then accesscard or fingerprint is 1 too..

anyhow shoould be easier to insert API from other services ?

Collapse
 
chiayen0503 profile image
Chiayen0503

Hi Berge,

Do you know how to separate and list prediction result for every detecting face in multiple frames?

I'd to create a list given detecting face; the list stores all possible candidate names after processing multiple frames.

The reason I do this is the predicting results from the API is not always correct; especially when we look on predicting result from a single frame but ignore from other frames.

Collapse
 
jamiayahyamadni profile image
jamia yahya madni

Hello sir! can you share your code with me only for educational purposes as I'm a student learning Artificial Intelligence I will only use the source code for learning my email is "digitalmolvi0@gmail.com" I shall be very thankful to you on this favor.

Collapse
 
harichandu13 profile image
hari Chandan

Hey Berge Maxim,
I am getting the below error while running the get_name_from_camera_feed.py file.
Could you please help me out why am I facing this problem.

File "get_name_from_camera_feed.py", line 49, in
known_face_encodings.append(face_recognition.face_encodings(face)[0])
IndexError: list index out of range

Collapse
 
aashaybane profile image
Aashay Bane

Hi How do I reject the picture from mobile , In case someone tries to cheat

Collapse
 
ehsaninfo profile image
ehsan-info

This is a web-based application. I want to use it on a mobile phone. Then what should I do? Please help me out by giving your suggestion.

Collapse
 
abdulqayoom91 profile image
ABDULQAYOOM91

How to connect ip camera and store videos
like cctv cameras ??
how to make complete hardware basis project using your project>

Collapse
 
graphtylove profile image
Berge Maxim

For the ip camera, it fully depends on the IP camera you use.
"how to make complete hardware basis project using your project"
I don't understand your question.

Collapse
 
partikchandra profile image
partikchandra

which platform would be easy to use and make this project

Collapse
 
kennstk profile image
kennstk

Dear Berge. Can you please send your code for reference purposes. Here is my email:kennstk@gmail.com

Collapse
 
jmbatabat profile image
jmbatabat

Hi Sir. Can you please send your code for reference purposes. Here is my email: johnmark.batabat@gmail.com

Collapse
 
favourcodes profile image
Ayobami Adedapo

How do I make it fingerprint based and not facial?

Collapse
 
graphtylove profile image
Berge Maxim

You have to use a finger print library. By it change all the code, you also have the install the finger print device.

Collapse
 
jamiayahyamadni profile image
jamia yahya madni

Someone Send me the Db schema ?

Collapse
 
allandosdiabos profile image
Allan dos Demônios

CREATE TABLE users (
id serial PRIMARY KEY,
name VARCHAR ( 100 ) UNIQUE,
arrival_picture VARCHAR ( 255 ),
date TIMESTAMP,
arrival_time TIME,
departure_time TIME,
departure_picture VARCHAR ( 255 )
);

Collapse
 
anigbojoel profile image
chidijoe

This seems to be a good project, but am finding it difficult to run on my system.
please can you share the schema for the database. thank you

Collapse
 
jryandechavez profile image
Ossphinc

Hello sir,
Can you share your code with me? My email is "jryandechavez@gmail.com"
Thank you so much

Collapse
 
abhigyaanbhardwaj profile image
abhigyaanbhardwaj

Sir, please share a step by step video or document related to this project only

Collapse
 
ankit531 profile image
Ankit kumar

Kudos! is your model is live. Can we have any sample that is in production.

Collapse
 
mannanmalik3998 profile image
Abdul Mannan

hi, i am also building a face recognition based attendance system for my semester project using the same library. May i know how many images per person have you utilized for encoding purpose.

Collapse
 
graphtylove profile image
Berge Maxim

Only one, the algorithm just need to calculate some parameters on the face so if you take one picture with a good quality it's ok.