Skip to content

Zsolt821201/iDentity-ml-fyp-py

Repository files navigation

Aim

This project aims to develop a web-based time management and user identification system that leverages facial recognition technology. The technology employs cameras to take a picture of the user’s face and then compare it to a previously registered image in the system to verify the user’s identity. The system grants access when the user’s identification has been verified and logs the user’s entry and exit times. This method may be utilized in various settings, such as businesses, institutions of higher learning, and healthcare facilities, to enhance security and time management. To see the full report, go to the report.

Requirements

  • Python 3.9 - Python is a programming language that lets you work quickly and integrate systems more effectively.

IDEs

  • VS Code - Code editing.Redefined. Free. Built on open source. Runs everywhere.1

Source Code Management

  • Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • GitHub Desktop - Simple collaboration from your desktop
  • WinMerge is an Open Source differencing and merging tool for Windows.

Online Tools

  • GitHub is a web-based hosting service for version control using Git. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its features.
  • gitignore.io - Create useful .gitignore files for your project
  • mermaid-js.github.io - Live Editor for the Mermaid diagramming language
  • plantuml.com - Open-source tool that uses simple textual descriptions to draw UML diagrams.

Run Application

  1. Clone the repository

    git clone https://github.com/zsolt821201/identity-ml-fyp-py.git
  2. Install dependencies

    • With Pip (To fast execute, run on Windows pip-install.cmd)

      pip install -r identity-django/requirements.txt
    • With conda (To fast execute, run on Windows conda-install.cmd)

      conda install --file identity-django/requirements.txt
  3. Run the app Open VS Code and run the app by pressing the F5 Key or
    Open a terminal and run the following commands:

    cd identity-django
    python manage.py runserver
  4. Open the app in your browser http://localhost:8000

Built-in user accounts are:

Username Password Role Note
Admin Password admin Built in admin account
ZsoltToth Password1234! user Built in user account
JoshuaFluke Letmein1$ user Built in user account

Testing

This project uses the following testing frameworks: Django Unit Tests, Behave BDD Tests, and Selenium WebDriver.

Run Django Unit Tests

To run the tests, open a terminal and run the following command:

cd identity-django
python manage.py test identity.tests

To run a select test for example tests in the identity.tests.FaceRecognitionUtilityTests.test_detect_face_with_blank module, open a terminal and run the following command:

python manage.py test identity.tests.FaceRecognitionUtilityTests.test_detect_face_with_blank

BDD Behave Tests

To test the App in the Chrome browser, you need to install the Selenium WebDriver for Chrome.

Test Requirements

To test the App in the Chrome browser, you need to install the Selenium WebDriver for Chrome.

  • Chrome - Google Chrome is a cross-platform web browser developed by Google.
  • ChromeDriver - WebDriver is an open-source tool for automated testing of webapps across many browsers.2

To run the tests, open a terminal and run the following command:

behave behave_test/features/feature_files/  -f pretty -o out/behave-logs/all.txt

To run selected tests for example tests with the tag zsolt, open a terminal and run the following command:

behave behave_test/features/feature_files/ --tags=zsolt -f pretty -o out/behave-logs/zsolt.txt

Copyright © 2023, Zsolt Toth

Footnotes

  1. The Extensions recommended for this project are in extensions.json

  2. In this project, a copy of ChromeDriver is included in the /behave_test/driver/ folder.