DEV Community

Cover image for Contactless Attendance System
Dhruv Panchal
Dhruv Panchal

Posted on

Contactless Attendance System

A Contactless Attendance System where your face is identified for Attendance.

Made with Python

Motivation 😲

  • This Repository was created as a part of MINeD Hackathon, a national level hackathon organized by Centre of Excellence in Data Science at the CSE Department of Nirma University.

  • We seek to provide a valuable attendance service for employees. Reduce manual process errors by provide automated and a reliable attendance system uses facial recognition technology.

Features 📋

  • Check Camera
  • Capture Faces
  • Train Faces
  • Recognize Faces & Attendance
  • Automatic Email

Screenshots 📷

1. GUI

GUI

2. Command Line Interface

Command Line Interface

3. Checking Camera

Checking Camera

4. Recognize Image

Recognize Image

5. Automail

Automail

Tech Stack Used 💻

Build With -

  • Python 3.8

Modules Used -

  • OpenCV Contrib
  • Pillow
  • Numpy
  • Pandas
  • Shutil
  • CSV
  • yagmail
  • Tkinter

Facial Recognition Algorithms -

  • Haar Cascade
  • LBPH (Local Binary Pattern Histogram)

Softwares Used -

  • Pycharm 2019.2
  • VS CODE
  • Jupyter Notebook
  • Git

Installation 🔑

Create Environment

First open the terminal or command line in the IDE and copy the following code.

python -m venv venv
Enter fullscreen mode Exit fullscreen mode

Then activate the virtual enviroment using the code below for windows.

.\venv\Scripts\activate
Enter fullscreen mode Exit fullscreen mode

Note: If your pc don't have virtual enviroment or pip install the follow this link. How to create Virtual Enviroment

Installing the Packages

After creating the enviroment on your project, let's install the necessary packages.

To install those package open the terminal or command line and paste the code from below:

pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Note: During the package installation, sometimes it shows errors due to package dependencies and to avoid those error you can install those packages as admin.

Test Run 🚴

After creating the virtual environment and installing the packages, open the IDE terminal to run the program.

  1. To use Command Line Version Use:
py main.py
Enter fullscreen mode Exit fullscreen mode
  1. To use GUI Version Use:
py main_gui.py
Enter fullscreen mode Exit fullscreen mode

Test Run for CAS as shown below:-

Test Run

How To Use? 📝

If you want to use it then follow the steps below:

  1. First download or clone the repository.
  2. Import the project to your preferable IDE. Recommended : PyCharm
  3. Create a python virtual environment.
  4. Install all the packages from requirements.txt.
  5. Change the mail information in the Info.py.
  6. Run the project using the Command Prompt or PowerShell or your IDE Terminal Button.

GitHub Link for CAS Source Code:

Contactless-Attendance-System

Team :

  1. Neel Shah
  2. Dhruv Panchal
  3. Urvesh Patel
  4. Nirja Desai
  5. Payal Devalia

Top comments (6)

Collapse
 
cmuralisree profile image
Chittoji Murali Sree Krishna • Edited

That's cool, I have also tried the same with cv2, but we can't expect 100% of face match, with a lower quality camera.

But I have tried in a different way, like setting images in a particular folder with person name, so that it trains the pictures in that folder with folder name, draws a graph on face so while reading the video and validates the face from example% to example%,

my-code

github.com/ChittojiMuraliSreeKrish...

And finally using mask for face like setting hue, saturation, so and so for making it easier to read the video.

My project might not be as good as you guys but I just wanna know, this is a proper or have to do change

Collapse
 
dhhruv profile image
Dhruv Panchal

Appreciate that but actually in some ways you've done better like directly reading from the video and we'll look forward to change according to your suggestions. And yeah the camera quality is lower so accuracy is not as expected.

Collapse
 
cmuralisree profile image
Chittoji Murali Sree Krishna • Edited

but my project needed a good ammount of pictures, atleast 4-5 pics to get a decent recognition, pictures to train, so it wont get confused and give other details. and you have to use PiL for image processing functionality

Thread Thread
 
dhhruv profile image
Dhruv Panchal

Yes, that's true. I did look into that in your repo.

Collapse
 
coderoo7 profile image
Shubham

Congrats to your team :)

Collapse
 
dhhruv profile image
Dhruv Panchal

Thanks ;)