A classroom attendance system and method based on face recognition
By setting up front face and back head cameras in the classroom, combined with image processing technology, mapping back head areas into front face images, the problem of low accuracy of multi-face recognition during classroom attendance is solved, and efficient and accurate face recognition effect is achieved .
Patent Information
- Application Number
- CN202411132334.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The existing classroom attendance system is difficult to meet the classroom attendance needs during multi-face recognition, especially in complex environments where the interference factors of facial recognition lead to low recognition success rate.
Two sets of cameras are used to collect panoramic images of the front face and the back head, and combined with the image processing unit to perform keystone correction and rotation of the image, mapping the back head area into the front face image, simplifying the hardware configuration and improving the accuracy and efficiency of face recognition.
It greatly improves the success rate of face recognition, reduces the computing burden of the processor, and realizes efficient and high-precision multi-faceted face recognition, suitable for classroom attendance scenarios.
Smart Images

Figure CN118658220B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a classroom attendance system, in particular to a classroom attendance system based on face recognition. Background Art
[0002] Traditional classroom attendance requires teachers to call the students according to the list, which is inefficient and takes up limited class time. With the development of technology, more and more intelligent attendance technologies are applied to classrooms. Currently, common intelligent attendance systems use face recognition to realize student attendance. The face recognition model can detect the location of the face in the image and match it with the face image in the database. If the match is successful, the face recognition is successful. When recognizing the faces of many students in the classroom, the accuracy and speed of face recognition are technical problems that need to be solved.
[0003] At present, the face recognition attendance system applied in campus is divided into two types. One is an attendance system that can only recognize one face at a time. Students only need to stand in front of the attendance machine and adjust their head posture so that their face is within the outline defined by the attendance machine to accurately complete face recognition and punch in. The advantage of this face recognition system is that the recognition accuracy is high, but the efficiency is low. It is currently only suitable for signing in at work where the density of personnel is not concentrated, and cannot solve the problem of rapid attendance of multiple people before class in the classroom. The other is an attendance system that recognizes multiple faces in a region at one time, such as a non-perception attendance system based on a classroom scene disclosed in CN112347856A, which collects panoramic images in the classroom by arranging multiple pan-tilt cameras in the classroom, and recognizes multiple faces in the panoramic image through complex image processing and algorithms. Although this technology can theoretically realize efficient and rapid recognition of multiple faces, it is found in the actual application process that the success probability of actual recognition is less than 70%, which is far from the accuracy requirement of classroom attendance. When performing image processing and face recognition, it is necessary to overcome various intricate situations. Since face recognition must first lock the frame of the face position based on facial features (especially skin color), when processing images inside the classroom, the skin color of the arms and neck is basically the same as that of the face. Sometimes the colors of other facilities and environments such as desks, chairs, floor tiles, etc. in the classroom are also close to the skin color of the face. At this time, when determining the position and area of the face, the above interference will greatly reduce the success rate of face recognition. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a classroom attendance system and method based on face recognition, which can accurately locate multiple faces in the classroom and improve the accuracy of face recognition.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a classroom attendance system based on face recognition, including an image acquisition module, a data communication module, and a face recognition module:
[0006] The image acquisition module includes a front face image acquisition unit and a back head image acquisition unit, wherein the front face image acquisition unit is used to acquire a front face panoramic image, and the back head image acquisition unit is used to acquire a back head panoramic image;
[0007] The image processing unit is used to receive the panoramic image, perform image processing on the panoramic image, identify and define the back of the head area corresponding to each face, and map the back of the head area in the back of the head panoramic image to the front face panoramic image to identify the face information;
[0008] The data communication module sends the face information processed by the image processing unit to the face recognition module;
[0009] The face recognition module extracts local facial feature information and compares the features in the cloud database to determine the facial identity information;
[0010] The cloud-based clock-in system completes attendance based on facial identity information.
[0011] Furthermore, a group of front face image acquisition units for acquiring front face images are arranged at the front of the classroom; and a group of back head image acquisition units for acquiring back head images are arranged at the back of the classroom.
[0012] Furthermore, the front face image acquisition unit adopts a high-definition camera, and the back of the head image acquisition unit adopts a high-definition camera or a black and white camera.
[0013] Furthermore, the distance between the adjacent front and rear rows of tables and chairs and the pitch attitude of the camera are appropriately adjusted so that when taking a panoramic image, it is ensured that adjacent front faces or backs of the heads in the image do not overlap, and it is best to have a distance between adjacent front faces or backs of the heads.
[0014] Furthermore, the positions and shooting angles of the front and rear cameras are adjusted to ensure that the size of the faces in the first row in the front face panoramic image is roughly the same as the size of the backs of the heads in the last row in the back of the head panoramic image, or in other words, the trapezoidal area of the students in the front face panoramic image is roughly the same size as the desk area of the students in the back of the head panoramic image.
[0015] Furthermore, a trapezoidal correction unit is provided in the image processing unit, which performs trapezoidal correction on the front face panoramic image and the back head panoramic image to obtain a rectangular front face panoramic image and a rectangular back head panoramic image.
[0016] Furthermore, the image processing unit is provided with a rotation unit, a back of the head recognition unit, a translation unit, and a mapping unit. The rotation unit rotates the rectangular back of the head panoramic image by 180°, the back of the head recognition unit recognizes multiple back of the head areas in the image, and the rotation unit also rotates the back of the head area by 180° around its geometric center to obtain a back of the head area distribution image; the translation unit translates the multiple back of the head areas recognized according to the pre-measured longitudinal errors to obtain a face area distribution image, maps the positions and contours of the multiple face areas in the face area distribution image to the rectangular front face panoramic image, and frames the multiple face information in the multiple face areas.
[0017] An attendance method for classroom attendance system based on face recognition:
[0018] S1: Adjust the distance between desks and chairs and the position and shooting angle of the camera to ensure that adjacent front faces or backs of heads in the image do not overlap, and preferably have an appropriate distance between adjacent front faces or backs of heads, to ensure that the size of the faces in the first row in the front face image is roughly the same as the size of the backs of heads in the last row in the back head image, or that the size of the trapezoidal area of the desk of the student in the front face image is roughly the same as the size of the trapezoidal area of the desk of the student in the back head image;
[0019] S2: Collecting panoramic images of the front face and the back of the head;
[0020] S3: transmitting the front face panoramic image and the back head panoramic image to the image processing unit for processing;
[0021] S3.1: Map the position and contour of the back of the head area to the frontal panoramic image to obtain a face area distribution image;
[0022] Wherein step 3.1 also includes: performing trapezoidal correction on the front face panoramic image and the back head panoramic image to obtain a rectangular front face panoramic image and a rectangular back head panoramic image; rotating the rectangular back head panoramic image by 180°, identifying multiple back head regions in the image, and rotating the multiple back head regions by 180° around their geometric centers to obtain a back head region distribution image; translating the multiple back head regions according to the pre-measured longitudinal errors to obtain a face region distribution image;
[0023] S3.2: capturing face information according to the face region distribution image, including mapping the positions and contours of multiple face regions in the face region distribution image to the rectangular frontal face panoramic image, and obtaining multiple face information by framing in the multiple face regions;
[0024] S4: Transmitting facial information to a facial recognition module or a cloud server;
[0025] S5: Perform feature comparison on the facial information to determine the facial identity information, and complete attendance based on the facial identity information.
[0026] Beneficial effects of the present invention: The attendance method of the present invention simplifies the hardware configuration of the classroom attendance system by setting two groups of cameras in the classroom to collect image information and combining the image processing unit to process the image; the face recognition area is defined by identifying the back of the head area, and the back of the head area opposite to the face is covered by hair, the color of the hair is uniform and can be distinguished from the skin of the human body and the color of other equipment in the classroom, so the difficulty of identifying the back of the head area is lower, which greatly improves the success rate of face recognition and reduces the calculation burden of the processor. The present application can efficiently and accurately identify multiple faces in the classroom, solves the technical problems of low accuracy and complex calculation of group face recognition in the classroom attendance system, and can greatly improve the promotion and application of face recognition technology in classroom attendance. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to represent the same components. In the drawings:
[0028] Figure 1 This is a diagram of the seating arrangement in the classroom;
[0029] Figure 2 This is a flowchart of the steps of the attendance method for this application;
[0030] Figure 3 Schematic diagram of a frontal panoramic image and a back head panoramic image;
[0031] Figure 4 Schematic diagram of a rectangular front face panoramic image and a rectangular back head panoramic image after trapezoidal correction;
[0032] Figure 5 It is a schematic diagram of a panoramic image of the back of the head after being rotated 180 degrees;
[0033] Figure 6 This is a schematic diagram of the back of the head area after identification;
[0034] Figure 7 The image is distributed for the back of the head area;
[0035] Figure 8 Schematic diagram of rectangular frontal face image and face area distribution. DETAILED DESCRIPTION
[0036] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0038] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0039] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0040] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0041] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0042] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.
[0043] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0044] See also Figures 1 to 8 ,The face recognition process is divided into four parts: face image acquisition, face image preprocessing, face image feature extraction, face matching and recognition.,The first prerequisite for ensuring the accuracy of face recognition is to obtain accurate face information, which involves the first two steps of the face recognition process, namely, face image acquisition and face image preprocessing.
[0045] As can be seen from the background technology, facial region positioning of a face faces many interference factors. In order to avoid interference factors from the front of the face and improve the accuracy and efficiency of face recognition, this application proposes a classroom attendance system and method based on face recognition.
[0046] The classroom attendance system of the present application is applied to a conventional classroom where desks and chairs are arranged in multiple rows, and the desks and chairs in each row are parallel and equidistantly distributed.
[0047] At the front of the classroom, that is, above the podium, a group of front face image acquisition units for acquiring front face images are arranged; correspondingly, at the back of the classroom, a group of back head image acquisition units for acquiring back head images are arranged. Among them, the front face image acquisition unit uses a high-definition camera, and the back head image acquisition unit can use a high-definition camera, or a lower-cost black and white camera. The camera of the front face image acquisition unit is used to shoot a panoramic front face image in the classroom from front to back, and the camera of the back head image acquisition unit is used to shoot a panoramic back head image in the classroom from back to front.
[0048] The distance between the adjacent front and rear rows of tables and chairs and the pitch posture of the camera can be adjusted appropriately so that when taking a panoramic image, adjacent front faces or backs of the heads in the image do not overlap, and preferably adjacent front faces or backs of the heads are at an appropriate distance.
[0049] When taking a frontal image, in order to make the facial features of the face more accurate, when checking attendance before class, a reminder sound will be issued by the broadcast or audio in the classroom to remind students to look up and look at the camera in front of them, so as to ensure that the face is photographed from the front. At the same time, the camera at the back of the classroom takes a panoramic image of the back of the head.
[0050] The front face image acquisition unit and the back head image acquisition unit are connected to the image preprocessing unit in the face recognition module, and the acquired images are transmitted to the image preprocessing unit. The image preprocessing unit identifies and locates the black hair area in the back head panoramic image that is easier to identify than the face. In this process, gray value image processing can be used to further improve the recognition success rate of the back head, thereby obtaining a distribution image of the back head area.
[0051] By mapping the position and contour of the back of the head area into the frontal panoramic image, a face area distribution image can be obtained.
[0052] The data communication module sends the facial information processed by the image processing unit to the facial recognition module; the facial recognition module extracts local facial feature information, performs feature comparison in the cloud database to determine the facial identity information; the cloud clocking system completes attendance based on the facial identity information.
[0053] Since the front face image acquisition unit is shooting from front to back, the size of the front face in the first row is obviously larger than that in the back row; similarly, the back head image acquisition unit is shooting from back to front, and the size of the front face in the last row is obviously larger than that in the back row. Therefore, after obtaining the distribution image of the back head area, it is not possible to directly locate the back head area in the corresponding face image.
[0054] The image processing unit is provided with a trapezoidal correction unit, which performs trapezoidal correction on the trapezoidal face area in the frontal panoramic image. The faces in the frontal panoramic image are also scaled to the same size as the faces in the first row, eliminating the size errors caused by the shooting angle and shooting distance. Specifically, four marking points can be set on the floor of the classroom. The above four marking points form a rectangular area and surround the desk and chair area. In the panoramic image taken by the camera, the front face of each student and the back of each student's head are within the rectangular area. Figure 3-4In the front face panoramic image and the back head panoramic image, the area surrounded by the four marking points is a trapezoid. The trapezoidal image surrounded by the four marking points is subjected to trapezoidal correction to obtain a rectangular front face panoramic image and a rectangular back head panoramic image after trapezoidal correction.
[0055] Since the shooting directions of the front face image acquisition unit and the back of the head image acquisition unit are completely opposite, the arrangement order of the face in the front face panoramic image is completely different from the arrangement order of the back of the head in the back of the head panoramic image. It is impossible to directly establish a mapping relationship. The image must be further processed to make the back of the head image correspond one-to-one to the face image.
[0056] The image processing method used in this application rotates the rectangular back head panoramic image by 180° to obtain Figure 5 , image processing unit recognition Figure 5 Multiple areas of the back of the head are obtained Figure 6 , Figure 6 The order of the back of the head in the panoramic image of the back of the head corresponds to the order of the face in the panoramic image of the front face, but Figure 6 The direction of each back of the head is upside down. At this time, the image processing unit rotates the identified back of the head area 180° around its geometric center to obtain Figure 7 The face area distribution image, Figure 7 The face area in the face area distribution image is actually the distribution image of the back of the head area after image processing. Its position and general outline are roughly the same as those of the face area. Therefore Figure 7 The obtained area distribution image can be used as a face area distribution image.
[0057] See also Figure 8 There is still a longitudinal error between the positions of the back of the head area and the face area. The longitudinal error can be measured in advance through experiments, and the longitudinal error is relatively stable. According to the preset longitudinal error, multiple back of the head areas in the back of the head panoramic image are synchronously translated to eliminate the longitudinal error.
[0058] According to the face area distribution image and the rectangular frontal face panoramic image, the positions and contours of multiple face areas in the face area distribution image are mapped to the rectangular frontal face panoramic image, and multiple face information is obtained by framing in multiple face areas. The face information is compared with the face database in the cloud server to complete face identity recognition and thus complete attendance.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.
Claims
1. A classroom attendance system based on face recognition, including an image processing unit, an image acquisition module, a data communication module, and a face recognition module; Features: The image acquisition module includes a front face image acquisition unit and a back head image acquisition unit, wherein the front face image acquisition unit is used to acquire a front face panoramic image, and the back head image acquisition unit is used to acquire a back head panoramic image; The image processing unit is used to receive a panoramic image, perform image processing on the panoramic image, identify and define the back of the head area corresponding to each face, and map the back of the head area in the back of the head panoramic image to the front face panoramic image to identify the face information; the image processing unit is provided with a trapezoidal correction unit, which performs trapezoidal correction on the front face panoramic image and the back of the head panoramic image to obtain a rectangular front face panoramic image and a rectangular back of the head panoramic image. The image processing unit is also provided with a rotation unit, a back of the head recognition unit, a translation unit, and a mapping unit. The rotation unit rotates the rectangular back of the head panoramic image by 180°, the back of the head recognition unit recognizes multiple back of the head areas in the image, and the rotation unit also rotates the back of the head area by 180° around its geometric center to obtain a back of the head area distribution image; the translation unit translates the multiple back of the head areas identified according to the pre-measured longitudinal error to obtain a face area distribution image, maps the position and contour of the face area in the face area distribution image to the rectangular front face panoramic image, and frames in the face area to obtain multiple face information; The data communication module sends the face information processed by the image processing unit to the face recognition module; The face recognition module extracts local facial feature information and compares the features in the cloud database to determine the facial identity information; The cloud-based clock-in system completes attendance based on facial identity information.
2. A classroom attendance system based on face recognition according to claim 1, Features: At the front end of the classroom, a group of front face image acquisition units for acquiring front face images are arranged; at the back of the classroom, a group of back head image acquisition units for acquiring back head images are arranged.
3. A classroom attendance system based on face recognition according to claim 2, Features: The front face image acquisition unit adopts a high-definition camera, and the back of the head image acquisition unit adopts a high-definition camera.
4. A classroom attendance system based on face recognition according to claim 3, Features: The distance between the adjacent front and rear rows of tables and chairs and the pitch posture of the camera are appropriately adjusted so that when taking a panoramic image, it is ensured that adjacent front faces or backs of the heads in the image do not overlap and there is a distance between adjacent front faces or backs of the heads.
5. A classroom attendance system based on face recognition according to claim 4, Features: Adjust the positions and shooting angles of the front and rear cameras to ensure that the size of the faces in the first row in the front face panoramic image is roughly the same as the size of the backs of the heads in the last row in the back of the head panoramic image, or that the trapezoidal area of the students in the front face panoramic image is roughly the same as the size of the trapezoidal area of the students in the back of the head panoramic image.
6. An attendance method for a classroom attendance system based on face recognition according to any one of claims 1 to 5: S1: Adjust the distance between desks and chairs and the position and shooting angle of the camera to ensure that adjacent front faces or backs of heads in the image do not overlap, and that adjacent front faces or backs of heads have a suitable distance, and that the size of the faces in the first row in the front face image is roughly the same as the size of the backs of heads in the last row in the back head image, or that the size of the trapezoidal area of the desk of the student in the front face image is roughly the same as the size of the trapezoidal area of the desk of the student in the back head image; S2: Collecting panoramic images of the front face and the back of the head; S3: transmitting the front face panoramic image and the back head panoramic image to the image processing unit for processing; S3.1: Map the position and contour of the back of the head area to the frontal panoramic image to obtain a face area distribution image; Wherein step 3.1 also includes: performing trapezoidal correction on the front face panoramic image and the back head panoramic image to obtain a rectangular front face panoramic image and a rectangular back head panoramic image; rotating the rectangular back head panoramic image by 180°, identifying multiple back head regions in the image, and rotating the multiple back head regions by 180° around their geometric centers to obtain a back head region distribution image; translating the multiple back head regions according to the pre-measured longitudinal errors to obtain a face region distribution image; S3.2: capturing face information according to the face region distribution image, including mapping the positions and contours of multiple face regions in the face region distribution image to the rectangular frontal face panoramic image, and obtaining multiple face information by framing in the multiple face regions; S4: Transmitting facial information to a facial recognition module or a cloud server; S5: Perform feature comparison on the facial information to determine the facial identity information, and complete attendance based on the facial identity information.
