/EAS-OpenCV-face_detection-python-django

Employee Attendance System by Real-Time Face Detection.

Primary LanguagePython

Employee Attendance System by Real-Time Face Detection.

  • Developed By Python, Django REST Framework, and OpenCV.

Instructions (Windows 10x64):

  • Some commands may differ depending on OS. Just google it.

  • Install latest version of Python3 (64 bit).

  • Install and active virtual environment directory

    1. Open cmd
    2. :~$ pip install virtualenv
    3. Choose destination: :~$ cd Desktop> virtualenv YourEnvironmentName
  • Clone this GitHub repository into local machine.

  • Go to project directory (GitHub repository) where 'manage.py' file exist.

  • Copy 'YourEnvironmentName' folder to the 'GitHub repository'.

  • Active virtual environment:

    1. :~$ cd YourEnvironmentName\Scripts>
    2. :~$ activate
    3. (YourEnvironmentName):~$ This '(YourEnvironmentName)' sign will be shown up if virtual environment activated successfully.
    4. :~$ cd../.. (exit from Scripts)
  • Install all the requirements using previously opened CMD where the virtual environment was activated:

    (YourEnvironmentName):~$ pip install -r requirements.txt

  • Run Local Server:

    (YourEnvironmentName):~$ python manage.py runserver

  • PATHs:

    1. API: http://127.0.0.1:8000/matched-user/galib/ (API takes any username for: /galib/)
    2. EAS Admin dashboard: http://127.0.0.1:8000/admin/
    3. Manual input: http://127.0.0.1:8000/user/input/
    4. Single object: http://127.0.0.1:8000/user/single-user/galib/ (takes any username for: /galib/)
    5. All objects: http://127.0.0.1:8000/user/all-users/
  • Run OpenCV Face Detection:

    1. Go to project directory (GitHub repository) where 'manage.py' file exist
    2. Go to openCV_face_recognition directory
    3. Open cmd here
    4. Type and Hit Enter:

      (YourEnvironmentName):~$ python facerecognition.py

  • Open both CMD (local server and face recognition) and API dashboard to monitoring the outputs

    1. status code 201 = Attendance created
    2. status code 200 = Attendance already exists
    3. status code 404 = ERROR

Server cmd output

BackEnd server output

OpenCV cmd output

OpenCV server output

EAS Database

EAS Dashboard

Real-Time Attendance Creating

Real-Time Attendance Counting

API dashboard

API dashboard

API JSON

API JSON

Manual Input from browser (http://127.0.0.1:8000/user/input/)

Manual input

Verification matched for single object

Single object matching

All objects by URL (http://127.0.0.1:8000/user/all-users/)

All objects from the Database

Single object by URL (http://127.0.0.1:8000/user/single-user/galib/)

Single object matching