Design of campus student identity identification and security management system based on K210

Student identification systems have become an important aspect of modern schooling and provide good ideas for campus security issues. However, the detection speed is slow and the security risk is high due to the use of student IC cards or access control machines with weak security features. For this reason, the article proposes a system design that combines student identification with security management: the system uses KPU acceleration based on K210 chip, combined with YOLOv2 image recognition algorithm in convolutional neural network to complete face recognition. At the same time, the system combines the campus network with the client to establish a real-time student sign-in management system. The system perfectly solves the problem that AI algorithms are difficult to deploy and successfully execute on hardware. At the same time, it minimises the size, greatly improves the recognition accuracy, and enables its popularity at a very low cost. Secondly, the backend of the system links to the mobile phone database to receive messages in real time, forming a student sign-in management system. Teachers can monitor students' attendance throughout the day. This paper provides a new solution for future school security management, providing campuses with more efficient and secure student attendance identification and effective management.


INTRODUCTION
Campus student identification is an important system on which schools depend [1].With the progress of the times, campus security is still an important topic, especially for primary and secondary school students who lack the awareness of self-protection, then the campus, as the main daily activity space, its security defence is very important.If a stranger or a criminal enters the campus, it will pose a great threat to the safety of students and other people.According to research, today's campus identification systems are slow, time-consuming, have low identification accuracy, and cover a large area [2].Therefore, there is an urgent need to design a secure campus identity security identification and management system that can monitor in real time, but also considering the advantages of speed, recognition accuracy, and lightweight size.This will not only improve campus security, but also contribute to and support the construction of campus IoT [3].Now, the face recognition system as a higher precision, stronger security line of defence solution is also slowly gaining popularity, according to the survey, most of the current face recognition machine used for campus student identification is not very popular, its footprint is large, inaccurate algorithms, slow recognition speed, resulting in always for the face recognition error, which not only reduces the efficiency of the work, but also leaves a security risk.
In the paper, a campus identification system based on K210 chip combined with YOLOv2 algorithm is proposed.Among them, yolo is used as an advanced algorithm to realize the face recognition function.Secondly, the system combines LAN and mobile communication devices to realize real-time monitoring and feedback of students at school.This improves the security performance and upgrades the campus security.k210 chip core adopts a dual-core framework, which is especially suitable for the processing of image recognition task.Compared with the traditional open MV and Arduino, K210 chip focuses more on low power consumption, which can cope with the campus such as the need to run for a long time [4].In terms of recognition algorithms, the YOLOv2 algorithm is the most suitable recognition algorithm to be deployed in hardware.Compared with YOLOv1, the introduction of anchor frames in YOLOv2 helps to improve the detection of the size and shape of the target object.Secondly, YOLO v2 uses a deeper Darknet-19 network architecture, which makes feature extraction easier.Then, compared to newer YOLO algorithms, such as the third generation, v2 has the advantage of being able to effectively embed the features in hardware, whereas v3's algorithm is so large and has a more complex network architecture that it cannot be deployed in the K210 chip [6].Therefore, the K210 chip combined with the YOLOv2 algorithm is chosen as the core of hardware and software to be designed in this article and is also the most appropriate.
Overall, a campus security system combining face identification function and real-time feedback of campus attendance is born, which is a comprehensive, complete, and efficient system, and its innovation lies in greatly improving the speed and accuracy of the

SYSTEM DESIGN SCHEME
The overall design is mainly divided into three parts, face recognition algorithm design; hardware circuit design; software system design.The design scheme based on K210 chip is shown in the system design diagram in Figure 1 K210 is used as the core control chip module, the camera is used as the image acquisition module; SD card is used as the database storage module for storing the model and information; the display is used for the interaction between hardware and software and display connection.The servo motor is used as the access control system and works according to the system instruction.
For the face recognition function, it is mainly divided into two modules: face detection and face recognition.The main function codes and programs are written in the integrated development environment.At the same time, I use the debugging omnipotent king software as a serial communication device to access the database and realize the sign-in and sign-out records.

FACE RECOGNITION THEORY 3.1 YOLOv2 sturcture
The YOLOv2 face recognition algorithm architecture is shown in Figure 2 The network structure of YOLOv2 is called Darknet-19, which consists of 19 convolutional layers [3].This architecture introduces the concept of Anchor Boxes, where representative Anchor Boxes are selected by clustering the target boxes in the training set to improve the model's adaptability to targets of different sizes and aspect ratios.The innovation of YOLOv2 is the use of a single network to achieve target detection end-to-end.Firstly, from the input image, the image is segmented into grids of the same size; then the image is passed through 19 convolutional layers in the Darknet-19 network to extract image features; YOLOv2 introduces Anchor Boxes to improve the model's ability to adapt to objects of different sizes and shapes by clustering the targets in the training set.The algorithm then uses multi-scale prediction, Bounding Box prediction, multi-class classification and loss function to achieve efficient target detection [7].YOLOv2 achieves a recognition rate of 78.6% at regular frame rates, and models such as Faster R-CNN and SSD have fallen behind the YOLOv2 algorithm.

Face detection and recognition process
Based on the facial recognition in this paper, the key to the algorithm is to obtain five key points of the face: left and right eyes, nose, and left and right mouth corners.In the second step, the corrected face model is extracted from the 68 feature points and compared with the trained model in the database for feature comparison [5].When the difference threshold is less than the threshold set by the system program, it is identified as a student face.The system in this paper uses a scoring method.If the score is greater than 80, the recognition is judged successful, and vice versa, the recognition fails.In Figure 3 five key locations and associated 68 points for face recognition are shown.

Algorithm execution process
Figure 4 shows the system algorithm execution flowchart.Which shows the steps of the algorithm line: first for the environment of face detection and YOLOv2 algorithm to load; then, initialize the hardware camera and the external display; configure the communication interface; subsequently, the storage module and recognition analysis still need to analyze and make judgments.Specific design, storage using SD card for model storage, face recognition score more than 85, recognition comparison for campus students, otherwise recognition failure.

Algorithm code display
The face recognition system in the design consists of hardware and software components.The software components include microcontroller firmware for control, machine learning algorithms for face detection and recognition, and LCD display for user interaction.The camera module captures real time images while the microcontroller unit processes the image data and controls the peripheral devices.The servo is used for physical indication of attendance confirmation.All hardware components are integrated into a compact system for seamless operation.
Firmware development involves programming the microcontroller to handle image processing tasks, interact with peripheral devices, and perform machine learning algorithms for face detection and recognition.Software modules for face detection, feature extraction and recognition are implemented using KPU (Kendryte Processing Unit) modules [8].In addition, UART communication facilitates data exchange with external devices such as Bluetooth.At system startup, all hardware components are initialized.This includes configuring the camera module, setting up the UART communication, initializing the servo, and preparing the LCD display for user interaction.In addition, pre-trained models are loaded from flash memory for face detection, feature extraction and recognition.
The system allows user interaction through a simple interface.A button is provided for initiating face registration, which allows the user to register their facial biometrics into the system.For registration, the user enters their identity information associated with their facial features.In the main loop, the camera captures the image and the face detection model recognizes the face in the frame.The detected faces are processed to extract the facial features and then compared with the stored template using the recognition model.If a match is found, indicating that an individual is recognized, the system records the attendance and displays the information on the LCD display.In addition, the servo is activated to provide physical feedback.
The specific nuclear generation is shown below:

SYSTEM HARDWARE DESIGN
For the hardware design, the MAIX BIT model development board, which is based on the K210 chip, is used for the overall design.MAIX BIT is a development board for embedded AI development that utilizes Sipeed's MAIX series chips.Its advantage lies in its strong ability for computer vision and image processing, a dedicated software development environment, rich interfaces, ultra-low power consumption, and is very suitable for use as recognition design hardware.According to the design needs I will be through the pin LCD display screen, camera, and servo through the wire in the breadboard to realize the circuit communication.The display shows the recognized screen and provides real-time feedback on the recognition status.At the same time, a buzzer is used as a prompt to alert students who have failed to recognize the screen several times to seek help from the administrator and solve the problem.It also serves as an alarm system for strangers who enter the campus by blasting.MS 9 Servo motor is used as an analog device for the gate.The servo motor has some control circuitry and a potentiometer connected to the output shaft.If the circuitry finds that the angle Typically, it is in the range of 210 degrees, but this depends on the manufacturer.Ordinary servo motors are used to control angular motion from 0 to 180 degrees [9].Ordinary motors are mainly used as a power source for continuously rotating equipment.In contrast, a servomotor equipped with a control mechanism can only rotate a fixed angle and stop at a precise position.Utilizing this feature, servo motors can be designed so that the access control system can control the number of people passing through at a time to prevent the unsafe situation of passing more than one person at a time.
The overall design is shown in Figure 5 which the camera and monitor are used as the acquisition and display modules, and the K210 chip is used as the main control chip.

SYSTEM SOFTWARE DESIGN 5.1 Software environment construction
The environment design requires an integrated development environment, a serial communication environment, and a data storage module.First, the training model in this design is stored on the SD card in the format of Kmodel, which is a special model file designed for the K210 chip and mainly used in the recognition function of the K210 chip.Second, this design must use the Kflash software environment as the carrier for serial port detection and pairing.After the development board's serial port communication is successful, the main program, algorithm and control program will be embedded into the development board to complete the whole process of program burning.Finally, its development environment can be developed by MaixPy, and the type of language used is mainly MicroPython.The MaixPy IDE provides regular annotated libraries and custom libraries and functions.After completing the whole process,The hardware will implement the design features: face recognition and input under a model file in the execution format Kmodel.The algorithm based on the lightweight YOLO V2 algorithm is relatively the easiest to implement.Compared to YOLO V1, it is not as accurate as the V2 algorithm, but the YOLO V3 algorithm is large and complexity, making it difficult to port to an embedded chip.In the end, YOLO V2 proved to be the most suitable algorithm for the K210 chip.The flowchart of face detection and recognition is shown in Figure 6, from model input, initialization, loading the detection face model, then locating the face position, and finally drawing the anchor frame to realize the recognition comparison.The recognition goal of YoloV2 is to combine the key points of the face and the 196-dimensional feature model of the face to extract the feature information of the face as the basis of recognition.The Keras deep learning framework trains the Yolov2 model, outputs the file and loads it into the KPU for convolutional operation, thus realizing fast recognition.The experiment was designed using the participants' facial data.The entire experiment was ethically reviewed, and consent and informed consent agreements were obtained from the participants.In addition, the private data I used will be destroyed after the experiment and cannot be saved.The KPU module allows the YOLOv2 network to be directly loaded and then combined with a face detection model to realize face recognition.The experiment proves that K210 KPU+YOLO2+ face model can easily detect faces with very high detection accuracy.

Cloud Security Management System
In this paper, the mobile phone is used as the mobile terminal because it enables the teacher to detect the students' presence in real time in order to make timely management.The port omnipotent is used as the communication port with the whole system hardware.Then, the school database is jointly used to enter student information and student face images.All the devices are under the same campus LAN, and teachers and administrators have access to the check-in and real-time status of their respective classes and campus groups.

TEST 6.1 System feasibility testing
The number of participants in the experiment was 10, divided into two groups.The first group's information was pre-loaded into the system, while the other group's avatars were found from 5 different images on Google.Twenty recognition tests were performed on these 10 faces and the correct recognition rate of each face ID was calculated.Through the statistics and analysis of the above experimental results, the system in this paper achieves an average recognition accuracy of 90%, which meets the preset results.It also achieved a 90% correct rate for recognition of faces that were not entered.Overall, the accuracy rate of this designed device meets the requirements.Among them, the first two diagrams are student recognition diagrams, and the last two diagrams are stranger recognition diagrams.
About the real-time scene in the experimental process, which make a display in the picture below in Figure 7.The first two of the images are student identification and the last two are unfamiliar identification.The results of the experiment are shown below, and its accuracy is more than 80, which meets the actual standard, and the recognition is successful.Table 1 is the real data record of the experiment.

System Performance Comparison
In this article, the advantages of the student face recognition and check-in system based on K210 combined with YOLOv2 are in the fast speed, high accuracy, small size, and low cost.In the test, 20 random pictures are selected as test objects, in which the computer CPU, GPU and K210 are used to repeat the experiment, and finally in the test time, spending cost is evaluated.In the test, the GPU of the computer used is NAIDIA RTX2060Ti, and the CPU is Intel(R) Core (TM) I7-10500.The test results are shown in Table 2, and the result is that K210 is relatively fast in face recognition, and consumes the lowest energy and the best cost.In addition, regarding the system volume, K210 as a very small device, compared with the traditional computer as the control center of the face recognition system must be able to reduce the size of the footprint, considering the demands of various aspects.

CONCLUSIONS
This design is a relatively complete design that combines identification and security management under the dual emphasis of campus security and management.The design utilizes advanced hardware devices and algorithms that are fast and accurate, which greatly improves efficiency and improves the limitations of such devices in today's reality.Combined with the new concept of campus IoT, the factual monitoring and feedback of the check-in and check-out system is shared on the mobile terminal, which plays a reinforcing role for students' campus safety.
At the same time, as a system, it is single-functional and not versatile enough, so more safety features need to be added, especially in the current global influenza pandemic, the temperature and physical condition of students need to be considered, in addition, the system is able to be co-designed by a variety of identification schemes, which makes the security stronger.Overall, the system designed in this paper is of great practical significance, proposing a highly feasible new solution for campus identity and security management system, considering many factors and practical situations, and making an effective solution to the problem of campus identification and management.

Figure 4 :
Figure 4: Face Detection and Recognition Flowchart

Figure 5 :
Figure 5: Complete System Hardware Display

Figure 6 :
Figure 6: face detection and recognition flowchart

Table 1 :
Experimental Data Record Sheet

Table 2 :
Performance Comparison Table