Introduction

Exigencies of System :

Company employees and students are your biggest asset and maintaining accurate information about their working hours, leave and presence report is very essential. One of the biggest challenges faced by employers and business owners is managing their employee attendance and timekeeping. Traditionally, a manual system was used to record the working hours of employees were using a manual system like catalogue or presenty sheets. Using such manual systems led to a lot of issues and errors & now in COVID19 situations the traditional method ( Contactive ) is non-preventive measure that organizations can take to stop the virus from spreading.

Issues with traditional method :

  • Some employees fails to remember to log in daily attendance and at other times, they deliberately abused the system by logging extended periods of time.
  • Manual system is very cumbersome and tedious to calculate the salaries for every employee which led to payroll errors.
  • Paper-based system is not cost effective if we considering money lost through payroll errors and frauds.
  • Existing fingerprint attendance system & paper-based attendance system is human contactive system ensuring COVID19

—————————————————————————————————————————————————————————————————————————————————–

Avails of Auto / Smart Attendance Management System :

  • Definative Precision.
  • Quick and uncomplicated process.
  • Cost Effective.
  • Contactless system. ( No human-system-human Contact envolved )

—————————————————————————————————————————————————————————————————————————————————–

Existing workdone by Mukesh – http://vadic.vigyanashram.blog/2021/01/29/biometric-attendance-system-using-opencv-and-python/

Recognition of problem :

  • Issue for encoding if the number of face data (Database) increase.
  • Encoding processing time is not effective according to end user.
  • No shedule to start and stop the system.
  • Incompetent for Implementation & Business modeling.

——————————————————————————————————————————————————————————————————————————————————-

Objectives :

  • Start the existing system for all the members of Vigyan Ashram.
  • Increase the processing time and system accuracy.
  • Task scheduler for system. ( User Friendly )
  • Make a compact system as product.

************************************************************************************************************************************************

Let’s Start

  • Install Python and dependencies. ( 9th Aug 2021 )

Python3.7 Installation : https://www.python.org/downloads/

  • Open the downloding file. Before installing make sure to check the block as ” Add python 3.7 in PATH ” and continue installing.
  • Open the command prompt.
  • Type py and press enter.
  • Installing and Testing PyCharm :

Download and install the community version of PyCharm: https://www.jetbrains.com/pycharm/download/#section=windows


  • I am Stuck !

Error : ‘pip’ is not recognized as an internal or external command

( 11th Aug 2021 )

What is causing the ‘pip’ is not recognized as an internal or external command error ?

  1. PIP installation is not added to the system variable
  2. The installation is incorrectly added in your PATH

Lets install pip on Windows 10 :

  • Confirm that Python is installed.
  • Once you have confirmed that Python is installed correctly, we can proceed with installing Pip.

Step 1 : Run the following command to download the get-pip.py file: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Step 2 : To install PIP type in the following: python get-pip.py

Step 3 : Add Pip to Windows Environment Variables:

Step 4 : Upgrading PIP for Python on Windows

New versions of PIP are released occasionally. These versions may improve the functionality or be obligatory for security purposes.

To check the current version of PIP, run: pip –version


Task 1 ( 13 Aug 2021 ) : Face detection from web cam using Opencv and python in PyCharm IDE

  • Download Sample Project Folder #/> Right click and open folder as Pycharm
  • We need to import cv2, before that we have install opencv-python library.

What is Opencv ? – OpenCV (Open Source Computer Vision) is a popular computer vision library started by Intel in 1999. Face detection using Haar cascades is a machine learning based approach where a cascade function is trained with a set of input data. OpenCV already contains many pre-trained classifiers for faces, eyes, smiles, etc..

  • For Installing opencv-python – Go to file -> Setting -> Project:Sample project -> Python Interpreter ( Here we can see all install lib. for project ) -> Click on add -> Search for desired Library ( opencv-python ) -> Select & hit install .
  • Run the task


Task 2 ( 14 Aug 2021 ) : Setup facial recognition library & dlib.

  • To start, First install Visual Studio because we need C++ based tools to install library.

Install Visual Studio (Download the Community Version Win 64bit ) and run it as administrator – https://visualstudio.microsoft.com/downloads/

  • Then install Cmake https://cmake.org/download/ ( Install Windows x64 Installer msi file)
  • Add and setup environmental variable for cmake.
  • open command prompt and run pip install cmake
  • Create face_test folder in documents in your pc.
  • Run below command one by one in command prompt.
  • cd documents
  • cd face_test
  • open face recogntion library – https://github.com/ageitgey/face_recognition
  • Copy the git web url.
  • Run command – git clone ( paste git web url here )
  • cd face_recognition
  • python setup.py install
  • Now we are successfully install face_recognition lib. and dlib.
( 15th Aug 2021 ) Installation Guidline

************************************************************************************************************************************************

( 17 Aug 2021 )

Trial 1 : Run the existing system with updated face_recognition lib. & dlib. , adding existing and new data in database & Removed unnecessary data.

Database – Images of members are captured. Multiple images of single member will be acquired with varied gestures and angles. These images undergo pre-processing. The images are cropped to obtain the Region of Interest (ROI) which will be further used in recognition process. Next step is to resize the cropped images to particular pixel position. Then these images will be converted from RGB to gray scale images. And then these images will be saved as the names of respective student in a folder.

Up till now I added 54 data file for 30 Members of Vigyan Ashram

System running and encoding :

What is Encoding ?

It is a face for us. But, for our algorithm, it is only an array of RGB values — that matches a pattern that the it has learnt from the data samples / database we provided to it.

For face recognition, the algorithm notes certain important measurements on the face — like the color and size and slant of eyes, the gap between eyebrows, etc. All these put together define the face encoding with 128-dimension.

( 19th Aug 2021 ) System is well executing with 3.0 min of encoding time

Short Testing :

( 23rd Aug 2021 )


.

Trial 2 : Collect the data of more 20 members ( DBRT Students ) Encode the database . Run & check the system for 50 Members of Vigyan Ashram. Check the performance.

Sample Testing ( 27th Aug 2021 ) System is well executing for 50 Members of VA with 9.0 min of encoding time

Execute the new program file to VA Office system :

( 30th Aug 2021 )

Uploading the new program file to the Vigyan Ashram office ( Previous system ) with newly added and upgrade data. Check the system performance while executing and encoding the file.

I noticed that on VA Office system program is not executing well, their is some system error, dlib and python library error while encoding. I unable to recognize the actual problem, I think it is a problem of un-updated python library and face recognition / dlib . So for this I uninstall python and pycharm, re-install again with above procedures ( Updated upgraded version for python and pycharm with upgrade face-recognition, dlib and c-make library ) .


Trial 4 : Now collect the data of more 15 members ( DBRT Students ) Encode the database . Run & check the system for 66 Members of Vigyan Ashram. Check the performance.

  • Experiencing the system for 2-3 days :
  • We have to start the system at morning 9am, so every morning I have to go in VA office to start the system & wait for 15 – 20 min to execute the program. If any time I unable to present then it get hectic to me to start the system and for other members also.
  • The VA office computer system has input device so sometimes members interference in the system which lead to loss the data, error and stop the program.

  • Task Scheduler : For Win10

The Task Scheduler enables you to automatically perform routine tasks on a chosen system. Task Scheduler does this by monitoring whatever criteria you choose (referred to as triggers) and then executing the tasks when those criteria are met.

The system now is so hectic to start and stop or has intervention of somebody ( admin ) to start the program on time and stop the system program on time. So to overcome this problem we have to use task schedular for attendance system to start / triggers program automatically and shut off on time.