项目作者: rizwansoaib

项目描述 :
Face Attendance (AWS rekognition)
高级语言: Python
项目地址: git://github.com/rizwansoaib/face-attendence.git
创建时间: 2019-02-28T17:33:14Z
项目社区:https://github.com/rizwansoaib/face-attendence

开源协议:MIT License

下载


FACE ATTENDENCE WITH AWS REKOGNITION

forthebadge made-with-python GPLv3 license star this repo
fork this repo

BUILD IN DJANGO WITH MYSQL DATABASES

Video Click to play

video

USE

INSTALLATION

1. Install awscli in your system and configure:

MAC LINUX OR UNIX

  1. rizwan@ubuntu$ sudo apt-get install awscli
  2. /* FIND YOUR ACCESS KEY AND SECRET KEY FROM AWS IN SECUIRTY CREDENTIALS */
  3. rizwan@ubuntu$ aws configure
  4. enter details of access key and secret key
  5. or
  6. rizwan@ubuntu$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
  7. rizwan@ubuntu$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  8. rizwan@ubuntu$ export AWS_DEFAULT_REGION=us-west-2

WINDOWS

  1. C:\> setx AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
  2. C:\> setx AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  3. C:\> setx AWS_DEFAULT_REGION=us-west-2

2. Import knit.sql DB

Mysql CommandLine

  1. mysql>create database db_name;
  2. mysql> use db_name;
  3. mysql> source knit.sql;

Terminal

  1. mysql -u username -p password db_name < knit.sql

Windows Command Prompt

  1. mysql -p -u [user] [database] < knit.sql

PowerShell

  1. C:\> cmd.exe /c "mysql -u root -p db_name < knit.sql"

3. Add Databases in Django Project

Go to face-attendence/web/web/settings.py

  1. Replace NAME,USER,PASSWORD with your credentials
  2. DATABASES = {
  3. 'default': {
  4. 'ENGINE': 'django.db.backends.mysql',
  5. 'NAME': 'db_name',
  6. 'HOST': '127.0.0.1',
  7. 'PORT': '3306',
  8. 'USER': 'username',
  9. 'PASSWORD': 'password',
  10. }}

4. Add your S3 name and path

Go to face-attendence/web/face/views.py in upload function

  1. Replace s3,object key name, with your credentials

5. Activate virtual environment

Go into web directory

  1. source env/bin/activate

5. Run server

  1. python3 manage.py runserver

Take class images and Upload it on our website-

class
faceclass

We are taking this photo as example

example

we stored images of student in s3 you can do it locally on your server

s3_images

Both images analyzing and detect faces and crop them

output

Cropping face

cropping-student

cropping-class

Now Matches face

matching

WebApp

Home,Student Register,Teacher Login,Student Login

web

Manual Attendance with single click

manual

Face Attendance Single Image required

face

Student Dashboard Attendance Report

student