SpringCloud+MySQL+Vue realizes face recognition intelligent attendance management system

I. Introduction

Students' class attendance is a very important content in the educational administration work of colleges and universities. As the number of students increases day by day, some colleges and universities have adopted attendance methods such as swipe card sign-in, fingerprint verification, and constrained face authentication. However, due to these methods, there are obvious drawbacks, such as waiting in line, cheating, etc., and it is difficult to get most of them. school recognition. Therefore, most schools still use the traditional manual attendance method, which has a heavy workload and cannot meet the needs of smart campus construction.

The source code is at the end of the article! ! ! You can get it by yourself~

2. Related technologies

The system adopts SpringCloud architecture to build multiple servers, uses Vue to realize front-end interactive platform and management page, uses MySQL database to store picture address text, daily attendance data and system operation logs, etc.; small face detection and recognition algorithm and other functional modules They are independent of each other and are deployed on the algorithm server and the back-end server in the form of sub-services. The functional test shows that the whole system works well, which not only eliminates the complicated manual attendance process, but also facilitates the unified management of colleges and universities, which is in line with the development trend of intelligentization of colleges and universities.

This paper designs and implements an automatic attendance management system on the basis of analyzing and researching micro face detection and recognition algorithms and related theories. The system, combined with the small face recognition technology based on ResNet, can detect and identify students in class on a large scale. The educational administrator only needs to add a class schedule on the management platform, set the attendance time of each class and the number of image collections, and the system will be implemented according to the predetermined time. Automate attendance, quickly complete the check-in and check-out of students, and present visual and diversified attendance statistics to educational administrators.

3. Detailed design and implementation of attendance system

1. System core module design

①、Module design based on tiny face recognition

Face recognition is one of the core modules of the attendance system, which completes the function of identifying students. This module mainly involves original image processing, data analysis, small face detection, face alignment and face recognition. The small face recognition process is shown in Figure 4-8. The system pre-processes the collected images according to the required format, and then calls the small face detection algorithm. After the algorithm is processed, the detection results are first parsed and extracted, and the system outputs the total detected results. The number of people and the face alignment and face recognition algorithms are called in turn. After the algorithm outputs the recognition results, it is judged whether there are still undetected people. If there are, continue to align and recognize until all the detected students are recognized.

②, image acquisition module

Image acquisition is one of the core modules of the attendance system, which completes the function of image timing and fixed-time snapshots. The process is shown in Figure 4-11. This module mainly involves steps such as camera control, timer triggering, and image acquisition. Before the timer starts, set the timing time and the number of acquisitions in advance. The system triggers the timing task by continuously monitoring the timer. When the set time is up, it executes an image acquisition command, and immediately turns off the camera after the image acquisition. After the resource occupation is released, it determines the number of acquisitions. If the number of times is enough, the acquisition process ends. . Otherwise, until a predetermined number of image acquisition processes are completed.

③、Attendance statistics module

The attendance statistics module is one of the core modules of the attendance system, which mainly completes the processing and statistical functions of the recognition results.

2. Design and implementation of other functional modules

①、Information management module

The information management page is shown in Figure 5-1. The educational administrator can browse the student information, class schedule information and the content of the course selection page, and test the basic functions of the module through page operations. The test results are shown in Table 5-3.

Figure 5-1 Test diagram of information management page 

②、Attendance summary module

The attendance summary page is shown in Figure 5-2. The system displays the check-in overview of a classroom for a semester from the perspective of students and courses, including course attendance, actual attendance, and student answer status. The EasyExcel framework is introduced to easily realize the table export function of fixed sheets and table headers. The export effect is shown in Figure 5-3. The educational administrator can download the attendance data and export the EXCEL format table as required. The function of the test module is operated through the page, and the test results are shown in Table 5-4.

Figure 5-2 Test diagram of attendance summary page

 

Figure 5-3 Course summary overview export rendering

③、Register login module

The test page is shown in Figure 5-4. When the user registers or logs in for the first time, the system will have an error message such as the account number cannot be empty and the password must be more than three digits. The JWT framework [36] is used to solve the user's token authentication problem. The user will attach the token value specified by the server to each interactive request, and judge the user information according to the difference of the value. Therefore, there is no need to save the authentication information on the server, which is beneficial to the application. extension. Use the Shiro framework to solve problems such as authentication, rights management, encryption control, etc. The function of the module is tested through page operations, and the test results are shown in Table 5-5.

Figure 5-4 Test diagram of registration login page 

④、System configuration module

The system configuration page is shown in Figure 5-5. The educational administrator can view the log content and set the attendance time and image collection times. The Spring framework is used to solve the problem of timer time setting and acquisition. The set time is stored in the database and parameters such as time and times are obtained in real time according to the timer status. In order to ensure the execution of timed tasks, all timers are set to be in effect to deal with course changes. Even if there is no class in the classroom, the timer will be triggered but the results of attendance statistics will not be affected, thus avoiding the problem of dynamically generating timed tasks and frequent Trouble setting attendance time. For some functional tests, see Table 5-6.

 

Figure 5-5 System configuration page test diagram

 

⑤、Image acquisition module

This module mainly involves camera control, timer triggering, and image acquisition. Spring supports multiple timing frameworks such as Timer and Quartz [39]. Among them, Quartz has the most complexity and high cost, and is suitable for changeable timing tasks, while Timer’s time The setting is not flexible enough. This article uses the SpringTask timer that comes with Spring. The timer is introduced by way of annotation, and the parameters of the timed task (Runnable) and the timed time (CronTrigger) are passed in. After the timer is started, the Spring container will automatically scan the timing. Task, execute the specified task according to the timing. The open source vision library JavaCV[40] is used to realize camera control and image acquisition, and the library interface of OpenCV is indirectly called through JavaCPP to directly obtain the current device information. Compared with the multimedia framework JMF, JavaCV does not need to warm up when the camera is started, and uses frame capture The processor directly obtains the video frame. The core code is shown in Figure 5-6, and each part needs to be functionally tested, and the test content is shown in Table 5-7.

⑥、Attendance statistics module

This module mainly involves data preprocessing, statistics, and database storage. The backend of the system obtains data in JSON format, and extracts valid information such as student number by preprocessing Map format data. Use a string array to store non-repeated student IDs, count the total number of people identified, compare it with the total number of people tested, and record the recognition results in the database according to parameters such as check-in time, student ID, and course ID. For some functional tests, see Table 5-8.

 

⑦, small face recognition module

This module mainly involves three parts: small face detection, face recognition and service interaction. The detection effect is shown in Figure 5-7. The green box represents the face with low detection confidence, and the yellow window represents the detection confidence. For higher faces, the server identification feedback is shown in Figure 5-8. In the figure, personID refers to the identification of the person to be identified, and the threshold is below the identification. The smaller the threshold, the higher the accuracy. The identification feedback mainly includes personnel ID and threshold. The results are directly stored in the database after processing, and no front-end page display is required. Therefore, the command line interactive window is used to display the identification function test results. The back-end uses Base64 encoding to collect the results and uses the Post request method to call the small face detection algorithm, and uses MultiValueMap (one-key multi-value mapping type) to receive the detection results and extract the total number of people detected. If there is an unrecognized person, the face alignment and recognition algorithms are called in sequence, and finally, the Map (one-key single-value mapping type) is used to receive the recognition feedback result. For some functional tests, see Table 5-9.

Figure 5-7 Small face detection renderings 

Figure 5-8 Small face recognition feedback diagram

4. Summary

This paper designs and implements an intelligent attendance management system based on tiny face recognition based on the analysis and research of tiny face detection and recognition algorithms and related theories, combined with the functional structure of the traditional attendance system. The main tasks are as follows:

1. Design an attendance system framework based on SpringCloud

In order to better refine the system functions, the idea of ​​microservices is adopted, and SpringCloud is a framework with balanced functions and convenient and efficient development in microservice solutions. Therefore, an attendance management system is designed with the SpringCloud framework: the small face recognition algorithm is independent of other modules of the system, deployed on the algorithm server, and the server is registered to the Eureka Server in a heterogeneous way of Sidecar. The backend of the system can request to call the small face detection and recognition algorithm in the form of service interaction, and the algorithm and the backend small face module can jointly complete the small face recognition function. At the same time, the backend of the system is also registered in Eureka, and the algorithm server can access the functional interface of the system. Separating algorithms and system modules can not only refine business functions, but also facilitate distributed development. Different programming languages ​​are used to design and implement various functions.

2. Implemented a tiny face recognition algorithm based on ResNet

By studying the tiny face detection algorithm, I learned how to effectively train a small face detector; then combined with some existing codes, I successfully trained a villain based on the ResNet101 basic model and the Wider Face face dataset on Matlab. face detector. After 2 days and 50 training iterations, the group of models with the best evaluation performance (with an average accuracy of 80%) was selected for the face detection function in the algorithm. At the same time, the face recognition model trained on the LFW face dataset and the Inception ResNet V1 basic network is used to complete the recognition function after small face detection.

3. Realized the prototype of attendance system based on small face recognition

Through frame design and algorithm analysis, an attendance management system is constructed based on the realization of tiny face algorithm. This system includes core functional modules: image acquisition, attendance statistics and small face recognition modules. The cooperation of the three completes the automatic attendance method. It also includes other functional modules, such as registration and login, information management, system configuration and other modules. The management platform of the system implements an interactive interface with the Vue front-end framework from a simple and practical point of view. It not only gives educational administrators a visual data display platform, but also completes basic operations on students, class schedules, attendance, and parameters. Finally, the whole system worked fine in test use.

The features of the system are as follows:

1. The use of micro face recognition technology can effectively detect and recognize faces one by one on a large scale, and the recognition process is non-perceptual, unconstrained, and easily accepted by students; secondly, it is also a kind of biometric technology, The identity authentication is reliable, and the phenomenon of typing and cheating in the traditional attendance method is effectively avoided.

②. The automatic attendance method and intermittent authentication method can quickly complete the check-in and check-out work, which greatly saves the class time.

Five, the project source code

Baidu cloud link: https://pan.baidu.com/s/1m3ZCBSnSxirBtQ07ZL4iAg 
extraction code: yidl

Guess you like

Origin blog.csdn.net/qq_41701956/article/details/124292234