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
- Open cmd
- :~$ pip install virtualenv
- 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:
- :~$ cd YourEnvironmentName\Scripts>
- :~$ activate
- (YourEnvironmentName):~$ This '(YourEnvironmentName)' sign will be shown up if virtual environment activated successfully.
- :~$ 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:
- API: http://127.0.0.1:8000/matched-user/galib/ (API takes any username for: /galib/)
- EAS Admin dashboard: http://127.0.0.1:8000/admin/
- Manual input: http://127.0.0.1:8000/user/input/
- Single object: http://127.0.0.1:8000/user/single-user/galib/ (takes any username for: /galib/)
- All objects: http://127.0.0.1:8000/user/all-users/
-
Run OpenCV Face Detection:
- Go to project directory (GitHub repository) where 'manage.py' file exist
- Go to openCV_face_recognition directory
- Open cmd here
- Type and Hit Enter:
(YourEnvironmentName):~$ python facerecognition.py
-
Open both CMD (local server and face recognition) and API dashboard to monitoring the outputs
- status code 201 = Attendance created
- status code 200 = Attendance already exists
- status code 404 = ERROR