Graduation Project---Web-side Attendance System Based on Face Recognition

 


1. Prospect Summary


1.1, Background Introduction

  1. This article is a comprehensive summary of my graduation project, involving programming codes of some important sections.

  2. It is a web-based face recognition project, and I hope that students who have related needs can benefit from it.

  3. Because I only learned the python language roughly in my sophomore year, and I missed the autumn recruits to prepare for the spring recruits, I completed it within one month starting in May.

  4. Frameworks, etc. are all learned from scratch, most of the content is repeated, and the code is extremely unsuccinct. Please correct me if I find any mistakes.

  5. Baidu network disk link: https://pan.baidu.com/s/161t1U0rAY7axadZmTRV_bQ Extraction code: mbzk

1.2, Knowledge Reserve 

1.3, reference website overview:

1.4, platform required

  • OS: Windows 64 bit

  • Third-party libraries: OpenCV, numpy, os, urlib, io, time, dlib, etc.

  • Development language: Python

  • Database: sqlLite3

  • Editor: Pycharm

  • Package management tool: Anaconda   


Second, the main page effect display


2.1, registration page

2.2, Email Verification Page

2.3, landing page 

 

2.4, logout page 

2.5, the main page

 2.6, the teacher publishes the course

2.7, the teacher's curriculum

2.8, course sign-in release

2.9, the teacher checks the attendance status

2.10, Students choose courses

2.11, Student Course Selection List

2.12, Student attendance

2.13, Student attendance check-in

2.14, face value measurement:

2.15, video tutorial learning:


Third, use the configuration


3.1, installation and configuration tutorial

3.2, package installation

  • Note: The installation of packages pays attention to the version compatibility between each other, and the code writing is sometimes different for different versions.

  • Method 1: In Anaconda Prompt: pip install library name -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com image acceleration

  • Method 2: Download the .whl file, cd to the corresponding directory through the command line, and install   the download address of most libraries through pip

  • Method 3: Anaconda Navigator installation: Click the green circle, select the second line on the left, environment, root, not installed, search for the corresponding package name, and install

  • Notice:

    • When installing packages, pay attention to the version compatibility between each other, and the code writing is sometimes different for different versions.

    • urllib and urllib2 are merged in versions after Python3, the installation should be: pip install urllib3

    • It is best to specify 14/pip install tensorflow==1.15 to install tensorflow in Python3.7 version 

    • The Dlib version corresponding to Python3.7 needs to be 3.7, and most of the online versions are 3.6. The link is as follows

    • The haarcascades file corresponding to face detection Opencv

3.3, common command line operations

  • Switch to E drive: E:

  • Toggle previous: cd ..

  • Switch to the specified path: cd pathname

  • pip operation version update: python -m pip install --upgrade pip

  • Force installation of the corresponding library: pip install --ignore-installed <library name>

  • Check python version: python -V

  • View the packages installed by anaconde: conda list

3.4, create a Django project

3.5, environment configuration

For details, please see: https://blog.csdn.net/weixin_44264744/article/details/105339873   Fifth, the framework of Django

Resource directory:

app project:

Setting configuration:

......
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',       #自带的session缓存模式
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'face',    #添加app名字
]
......
DATABASES = {                               #数据库配置  sqlite3
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}                               
......
DATABASES={  
    'default': {
        'ENGINE': 'django.db.backends.mysql',   #数据库类型
        'NAME':'ttsx',                          #名字
        'HOST':'localhost',                     # 地址
        'PORT':'3306',                          #端口
        'USER':'xxxxx',                         #账号
        'PASSWORD':'xxxx',                      #密码
}} #model.py 开头添加from future import unicode_literals,mysql连接需要安装Pillow   
...... 
LANGUAGE_CODE = 'zh-hans'   #改换成中国时区
TIME_ZONE = 'Asia/Shanghai'
......
STATIC_URL = '/static/'      
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static')  #无论目录是APP/根或是其它 方便查找static  
]   

url.py configuration:

from django.contrib import admin
from django.urls import path, include 
from face import views  #从对应app内导入函数

urlpatterns = [
    path('admin/', admin.site.urls),
    path('register',views.Register), 
]

 

 

 

 

 

 

 

100 beautiful landing registration pages

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326586666&siteId=291194637