Method and device for generating attendance abstract based on global traceability
By identifying and constructing a student appearance list, inferring identities based on global traceability and compressing attendance records, a detailed attendance summary is generated, which solves the problem of being unable to accurately simulate classroom attendance summaries and facial recognition failures in existing technology, and improves the accuracy of attendance analysis. performance and reliability.
Patent Information
- Application Number
- CN202410661139.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-06
AI Technical Summary
The existing classroom attendance system cannot accurately simulate attendance summaries in classroom practice, such as ‘20 minutes late’ or ‘10 minutes early’, which makes it difficult to analyze attendance in the later stage. Moreover, students lower their heads or face sideways, causing face recognition to fail and unable to take attendance normally.
By identifying the location and identity of students in classroom photos at different times, a student appearance list is constructed, the identity of the person whose face recognition failed is inferred based on global traceability, and the attendance status is compressed according to time slices to generate an attendance summary with attendance categories and absence duration.
It effectively solves the problem of missed inspections caused by students lowering their heads or turning their faces sideways, avoids statistical fluctuations caused by students leaving for a short period of time, and improves the accuracy and reliability of attendance summaries.
Smart Images

Figure CN118609181A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and device for generating attendance summaries based on global tracing. Background Art
[0002] At present, most universities have built smart campuses, and the classroom attendance system is one of the important construction projects. Existing classroom attendance systems often rely on smart cameras and are limited to distinguishing between normal and absent, and cannot simulate the attendance summaries often used in classroom practice, such as "late 20 minutes", "leave 10 minutes early", etc., making it difficult to conduct subsequent attendance analysis.
[0003] Patent application number 202311043197.2 discloses an absence list generated by comparing two classroom pictures in the same class, and automatically sets students' lateness, early departure, and absenteeism records. However, it is not suitable for attendance applications of surveillance cameras, nor does it take into account the duration of absences. Patent application number 2019103242537 discloses that an image to be taken of attendance is obtained through a camera device in the classroom, which includes image information of students in all seats in the entire classroom, so as to quickly sign in all students in the classroom and generate attendance information. However, in class, students often bow their heads for a long time or occasionally bow their heads / side faces, causing facial recognition to fail and attendance to fail normally. Summary of the invention
[0004] In view of the defects in the prior art, the purpose of the present invention is to provide a method and device for generating attendance summaries based on global traceability.
[0005] In a first aspect, an embodiment of the present application provides a method for generating an attendance summary based on global traceability, comprising:
[0006] Identify the location and identity of students in classroom photos at different moments and construct a list of students’ appearances;
[0007] Infer the identity of students who failed face recognition based on global tracing;
[0008] Compress the time slots into a time slot appearance list and compare the students' attendance in different time slots;
[0009] Generate attendance summaries with attendance categories and absence duration.
[0010] Optionally, identify the location and identity of students in classroom photos at different moments and construct a list of students' appearances, including:
[0011] If the current time is greater than the class time, class photos are collected according to the preset cycle;
[0012] identifying the location and identity of students from said classroom photograph;
[0013] If the current time is greater than the class end time, a student appearance list is constructed based on the student's location and identity at different times.
[0014] Optionally, identifying the location and identity of the student through the classroom photo includes:
[0015] By using target detection technology, the head frame of each student is found from the classroom photos at different times;
[0016] Separating the head image of each student based on the coordinates of the head frame;
[0017] The face recognition technology is used to identify the head image and output the location and identity of the students at different times.
[0018] Optionally, the identity of the student who failed face recognition is inferred based on global tracing, including:
[0019] Assume that the student's appearance list is recorded as: [(1,R1),(2,R2),…,(k,R k )]; where R j represents all the head frames and student identities that have been successfully recognized at the jth moment, j = 1, 2, ..., k; the time interval for collecting classroom photos is 1 minute, and the class length is k, in minutes;
[0020] The constructed face failure list is recorded as: [(bb1,t1),(bb2,t2),…,(bb n ,t n )]; among them, bb i Indicates the head frame that failed to be recognized at the i-th moment, i = 1, 2, ..., n, n represents the number of times face recognition failed;
[0021] If i is less than or equal to n, j is less than or equal to k, and j is not equal to t i When , determine whether d is less than or equal to |R j |, where t i represents the moment of collecting the i-th classroom photo; |R j | indicates R j The length of R j The index of the element;
[0022] If d is less than or equal to |R j |, then loop to process R j |R j | element (b j d ,c j d); if c is satisfied j d In R ti does not exist in b j d With bb i The distance <= ε, where b j d Represents R j The d-th head frame, c j d Represents R j The student identity of the d-th head frame, R ti Indicates the tth i All face frames and identities that have been successfully recognized at the moment, ε represents the experience value;
[0023] Then find the identity of the students in the similar position, and put (bb i ,c j d ) added to t i List of students appearing at the moment R ti In the above figure, the identities of the students who failed the face recognition are inferred.
[0024] Optionally, the time slices are compressed into a time slice occurrence list, including:
[0025] Group by student identity, generate i and the corresponding time series T i The student appearance list composed of i represents the identity of the i-th student, T i represents all the successful face recognition times of the i-th student;
[0026] Loop through each element in the student list (c i ,T i );
[0027] Starting from 1, use L i Save T i The compressed time slices appear in a list, and L i The initial value of is empty; among them, L i represents the time slice of all successful face recognition times of the i-th student;
[0028] Cycle Processing T i Each element t in ij , and calculate t ij The end time of the time slice seg_end, and insert seg_end into L i ; where t ij represents the time when the jth face recognition of the i-th student was successfully performed;
[0029] For L i Remove duplicate elements and sort in ascending order;
[0030] At the end of the loop, use L i Update T i , and output the student's time slice appearance list, where L i T i A compressed version of L i The length is less than T i Length.
[0031] Optionally, generate an attendance summary with attendance category and absence duration, including:
[0032] Extract the list of students from the input time slice appearance list;
[0033] Loop through the elements of the list that appear in the time slice (c i ,L i );
[0034] If L i The length of L is equal to SEG_NUM, which means that the current student appears at least once in each time slice, and the summary is set to normal; if L i The length of is not equal to SEG_NUM, which means L i is a proper subset of B;
[0035] Calculate the duration of absencea i =(length of B – L i length)*time slice length; where B represents the complete set of time slice end times, SEG_NUM = class length / SEG_LEN length; SEG_LEN represents the time slice length, and SEG_NUM represents the number of time slices / class;
[0036] If L i In the middle of B, it means that the student is late and leaves early, set summary = late and leave early a i minute;
[0037] If L i At the end of B, it means the student is late, set summary = late a i minute;
[0038] If L i At the head of B, it means that the student left early, set summary = leave early a i minute;
[0039] If L i If not in B, set Summary = Absent a i minute.
[0040] In a second aspect, an embodiment of the present application provides an attendance summary generation device based on global traceability, comprising:
[0041] A recognition module is used to identify the location and identity of students in classroom photos at different moments and build a list of students’ appearances;
[0042] The identity inference module is used to infer the identity of students who failed face recognition based on global traceability;
[0043] The compressed attendance record module is used to compress the attendance records into a time slot appearance list according to the time slot and compare the attendance of students in different time slots;
[0044] Tag Attendance Summary module to generate attendance summary with attendance category and absence duration.
[0045] Optionally, the identification module is specifically used to:
[0046] If the current time is greater than the class time, class photos are collected according to the preset cycle;
[0047] identifying the location and identity of students from said classroom photograph;
[0048] If the current time is greater than the class end time, a student appearance list is constructed based on the student's location and identity at different times.
[0049] Optionally, the identification module is specifically used to:
[0050] By using target detection technology, the head frame of each student is found from the classroom photos at different times;
[0051] Separating the head image of each student based on the coordinates of the head frame;
[0052] The face recognition technology is used to identify the head image and output the location and identity of the students at different times.
[0053] Optionally, the identity inference module is specifically used to:
[0054] Assume that the student's appearance list is recorded as: [(1,R1),(2,R2),…,(k,R k )]; where R j represents all the head frames and student identities that have been successfully recognized at the jth moment, j = 1, 2, ..., k; the time interval for collecting classroom photos is 1 minute, and the class length is k, in minutes;
[0055] The constructed face failure list is recorded as: [(bb1,t1),(bb2,t2),…,(bb n ,t n)]; among them, bb i Indicates the head frame that failed to be recognized at the i-th moment, i = 1, 2, ..., n, n represents the number of times face recognition failed;
[0056] If i is less than or equal to n, j is less than or equal to k, and j is not equal to t i When , determine whether d is less than or equal to |R j |, where t i represents the moment of collecting the i-th classroom photo; |R j | indicates R j The length of R j The index of the element;
[0057] If d is less than or equal to |R j |, then loop to process R j |R j | element (b j d ,c j d ); if c is satisfied j d In R ti does not exist in b j d With bb i The distance <= ε, where b j d Represents R j The d-th head frame, c j d Represents R j The student identity of the d-th head frame, R ti Indicates the tth i All face frames and identities that have been successfully recognized at the moment, ε represents the experience value;
[0058] Then find the identity of the students in the similar position, and put (bb i ,c j d ) added to t i List of students appearing at the moment R ti In the above figure, the identities of the students who failed the face recognition are inferred.
[0059] Optionally, the compressed attendance record module is specifically used to:
[0060] Group by student identity, generate i and the corresponding time series T i The student appearance list composed of i represents the identity of the i-th student, T i represents all the successful face recognition times of the i-th student;
[0061] Loop through each element in the student list (c i ,T i );
[0062] Starting from 1, use L i Save T i The compressed time slices appear in a list, and L i The initial value of is empty; among them, L i represents the time slice of all successful face recognition times of the i-th student;
[0063] Cycle Processing T i Each element t in ij , and calculate t ij The end time of the time slice seg_end, and insert seg_end into L i ; where t ij represents the time when the jth face recognition of the i-th student was successfully performed;
[0064] For L i Remove duplicate elements and sort in ascending order;
[0065] At the end of the loop, use L i Update T i , and output the student's time slice appearance list, where L i T i A compressed version of L i The length is less than T i Length.
[0066] Optionally, the attendance summary marking module is specifically used for:
[0067] Extract the list of students from the input time slice appearance list;
[0068] Loop through the elements of the list that appear in the time slice (c i ,L i );
[0069] If L i The length of L is equal to SEG_NUM, which means that the current student appears at least once in each time slice, and the summary is set to normal; if L i The length of is not equal to SEG_NUM, which means L i is a proper subset of B;
[0070] Calculate the duration of absencea i =(length of B – L ilength)*time slice length; where B represents the complete set of time slice end times, SEG_NUM = class length / SEG_LEN length; SEG_LEN represents the time slice length, and SEG_NUM represents the number of time slices / class;
[0071] If L i In the middle of B, it means that the student is late and leaves early, set summary = late and leave early a i minute;
[0072] If L i At the end of B, it means the student is late, set summary = late a i minute;
[0073] If L i At the head of B, it means that the student left early, set summary = leave early a i minute;
[0074] If L i If not in B, set summary = absenta i minute.
[0075] In a third aspect, an embodiment of the present application provides an attendance summary generation device based on global traceability, comprising: a processor and a memory, wherein executable program instructions are stored in the memory, and when the processor calls the program instructions in the memory, the processor is used to:
[0076] Execute the steps of the method for generating attendance summaries based on global traceability as described in any one of the first aspects.
[0077] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the attendance summary generation method based on global traceability as described in any one of the first aspects.
[0078] Compared with the prior art, the present invention has the following beneficial effects:
[0079] In this application, the location and identity of students in classroom photos at different times are identified to construct a student appearance list. Then, based on global traceability, the identity of students whose face recognition failed is inferred, and the list is compressed into a time slice appearance list according to the time slice. By comparing the attendance of students in different time slices, an attendance summary with attendance category and absence duration is finally generated. This effectively solves the problem of missed detection caused by students lowering their heads / facing sideways, and by compressing the attendance records, the statistical fluctuation problem caused by students leaving for a short time can be avoided, making the attendance summary more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:
[0081] Figure 1 A flowchart of a method for generating attendance summaries based on global traceability provided in an embodiment of the present application;
[0082] Figure 2 A flow chart of a method for identifying students present provided in an embodiment of the present application;
[0083] Figure 3 A flowchart of a method for global traceability and identification provided in an embodiment of the present application;
[0084] Figure 4 A flow chart of a method for compressing attendance records provided in an embodiment of the present application;
[0085] Figure 5 A flow chart of a method for marking attendance summaries provided in an embodiment of the present application;
[0086] Figure 6 A schematic diagram of code annotations provided for an embodiment of the present application;
[0087] Figure 7 A flowchart of another method for generating attendance summaries based on global traceability provided in an embodiment of the present application;
[0088] Figure 8 A schematic diagram of the first type of abstract provided in an embodiment of the present application;
[0089] Fig. 9 A schematic diagram of the second abstract provided in the embodiment of the present application;
[0090] Fig.10 A schematic diagram of the third type of abstract provided in the embodiment of the present application;
[0091] Fig.11 A schematic diagram of the fourth abstract provided in the embodiment of the present application;
[0092] Fig.12 A schematic diagram of the fifth abstract provided in the embodiment of the present application;
[0093] Fig.13 A schematic diagram of the sixth type of abstract provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0095] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there can be a central component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there can be a central component at the same time.
[0096] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0097] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0098] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0099] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0100] Figure 1A flowchart of a method for generating attendance summaries based on global traceability provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method in this embodiment may include:
[0101] Step S101: Identify the positions and identities of students in classroom photos at different times, and construct an appearance list of students.
[0102] In this embodiment, the current time is first obtained. If the current time is greater than the class time, classroom photos are collected according to a preset period; the student's location and identity are identified through the classroom photos; if the current time is greater than the class time, a student appearance list is constructed based on the student's location and identity at different times.
[0103] For example, an application or device for classroom or meeting attendance can be implemented by using classroom photos taken by a smart camera or a mobile phone.
[0104] In an optional implementation, target detection technology can be used to find the head frame of each student in the classroom photos at different times; the head image of each student can be separated based on the coordinates of the head frame; face recognition technology can be used to identify the head image, and the position and identity of the students at different times can be output.
[0105] Figure 2 A flow chart of a method for identifying students present provided in an embodiment of the present application, such as Figure 2 As shown, target detection technology is first used to process t i The classroom picture at the moment is used to output the head frame. Each head frame is represented by (x, y, w, h), where x is the x-coordinate of the center point of the frame, y is the coordinate of the center point of the frame, w is the width of the frame, and h is the height of the frame.
[0106] For example, the target detection technology can refer to the Yolo method, and separate the head images [img1, img2, ...] from the classroom images according to the head frame coordinates. Then, the face recognition technology is used to identify the head images and output t i List of students appearing at the moment R i =[(b i 1,c i 1),(b i 2,c i 2),…] and the face recognition failure list F i =[(bb i 1,t i ),(bb i 2,t i ),…]. Among them, bb i j Yes i The head frame at which face recognition fails at the moment.
[0107] It should be noted that this embodiment does not limit the specific method of face recognition technology, and existing face recognition technologies can be applied in this embodiment.
[0108] Step S102: infer the identity of the student who failed face recognition based on global traceability.
[0109] In this embodiment, it is assumed that the student appearance list is recorded as: [(1, R1), (2, R2), ..., (k, R k )]; where R j represents all the head frames and student identities of all successfully recognized faces at the jth moment, j = 1, 2, ..., k; the time interval for collecting classroom photos is 1 minute, the class length is k, and the unit is minutes; the constructed face failure list is recorded as: [(bb1, t1), (bb2, t2), ..., (bb n ,t n )]; among them, bb i Indicates the head frame that failed to be recognized at the i-th moment, i = 1, 2, ..., n, and n represents the number of failed face recognitions.
[0110] For example, if i is less than or equal to n, j is less than or equal to k, and j is not equal to t i When , determine whether d is less than or equal to |R j |, where t i represents the moment of collecting the i-th classroom photo; |R j | indicates R j The length of , d represents the index of Rj element;
[0111] If d is less than or equal to |R j |, then loop to process R j |R j | element (b j d ,c j d ); if c is satisfied j d In R ti does not exist in b j d With bb i The distance <= ε, where b j d Represents R j The d-th head frame, c j d Represents R j The student identity of the d-th head frame, R ti Indicates the tth iAll the face frames and identities of the successfully recognized faces at the moment, ε represents the experience value; then find the identity of the student at a similar position, and put (bb i ,c j d ) added to t i List of students appearing at the moment R ti In the above figure, the identities of the students who failed the face recognition are inferred.
[0112] In this embodiment, in order to prevent the problem of missed detection caused by students lowering their heads, the identities of the head frames in similar positions in all classroom pictures (except the current classroom picture) are searched as the identities of the students whose face recognition failed in the current classroom picture, thereby improving the recall rate of face recognition, which is called "global tracing".
[0113] For example, Figure 3 A flowchart of a method for global traceability and identification provided in an embodiment of the present application, such as Figure 3 As shown, starting from the first minute of class, t i R generated by classroom pictures at the moment i Composition (t i ,R i ), connected into a student appearance list [(1,R1),(2,R2),...,(k,R k )]. Connect all the classroom pictures to generate F i , generate a list of n elements of face recognition failures [(bb1,t1),(bb2,t2),...,(bb n ,t n )] Loop through the n elements of the face recognition failure list (bb i ,t i ). i is the outer loop variable, starting from 1. Loop to find the k elements (j, R) of the student list. j ). j is the inner loop variable, starting at 1. If j is not equal to t i , represents the time when face recognition fails and R j If the occurrence time is different, then continue; otherwise, jump to the next inner loop. Loop processing R j |R j | element (b j d ,c j d ). d is the inner 2nd loop variable, starting from 1. |R j | stands for R j If both conditions are met, execute ⑧; otherwise, jump to the next inner 2-layer loop.
[0114] Condition 1: c j d In R tidoes not exist (represents c j d In t i moment is not recognized);
[0115] Condition 2: b j d With bb i The distance is <=ε (indicating that the positions of the two head frames are close).
[0116] b j d With bb i The distance is evaluated by the Euclidean distance of the center point, and ε is an empirical value (required to be less than the average distance between seats). The Euclidean distance is defined as follows:
[0117]
[0118] Where b1 = (x1, y1, w1, h1) and b2 = (x2, y2, w2, h2).
[0119] Find the identity of the students in the similar position and put (bb i ,c j d ) added to t i List of students appearing at the moment R ti , jump to the outer loop. Copy R i To S i ,S i Keep only R i The identity in S i =[c i 1,c i 2,...]. Finally, as long as the student who lowered his head sits in the same seat, the output list of students who appeared at the time of lowering his head also includes his identity.
[0120] Step S103: compress the time slices into a time slice appearance list, and compare the attendance of students in different time slices.
[0121] In this embodiment, firstly, the students are grouped according to their identities to generate i and the corresponding time series T i The student appearance list composed of i represents the identity of the i-th student, T i represents all the successful face recognition times of the i-th student; loops through each element in the student appearance list (c i ,T i ); starting from 1, use L i Save T i The compressed time slices appear in a list, and L iThe initial value of is empty; among them, L i Represents the time slice of all successful face recognition times of the i-th student; loop processing T i Each element t in ij , and calculate t ij The end time of the time slice seg_end, and insert seg_end into L i ; where t ij represents the time when the jth face recognition of the i-th student was successfully performed; for L i Remove duplicate elements and sort in ascending order; at the end of the loop, use L i Update T i , and output the student's time slice appearance list, where L i T i A compressed version of L i The length is less than T i Length.
[0122] For example, Figure 4 A flow chart of a method for compressing attendance records provided in an embodiment of the present application, such as Figure 4 As shown in the figure, in order to prevent students from occasionally leaving and affecting the stability of absence time statistics, the attendance of students is counted according to time slices. Assuming that the photo-taking interval is 1 minute, m students are identified and grouped according to student ID to generate a i and the corresponding time series T i ([t i1 ,t i2 ,...]) composed of the student appearance list [(c1,T1),(c2,T2),...,(c m ,T m )] Loop through each element of the student's appearance list (c i ,T i ). i is the outer loop variable. Initialize the variable. j is the inner loop variable, starting from 1; L i Save T i The compressed time slice appears in the list, and the initial value is empty. Loop processing T i Each element t in ij . |.|Find the length of the list, |T i |Represents T i Calculate t ij The end time of the time slice seg_end. / / It is a rounding operation, SEG_LEN is the length of the time slice (minutes). seg_end inserts L i .L i Remove duplicate elements and sort in ascending order. At the end of the inner loop, use L i Update T iThe final output is a list of students’ time slices [(c1,L1),(c2,L2),...,(c m ,L m )]. i It is T i A compressed version of L i The length is less than T i Length.
[0123] Step S104: Generate an attendance summary with attendance category and absence duration.
[0124] In this embodiment, firstly, a student list is extracted from the input time slice occurrence list; then the elements of the time slice occurrence list are processed cyclically (c i ,L i ); if L i The length of L is equal to SEG_NUM, which means that the current student appears at least once in each time slice, and the summary is set to normal; if L i The length of is not equal to SEG_NUM, which means L i is a proper subset of B;
[0125] Calculate the duration of absencea i =(length of B – L i length)*time slice length; where B represents the complete set of time slice end times, SEG_NUM = class length / SEG_LEN length; SEG_LEN represents the time slice length, and SEG_NUM represents the number of time slices / class;
[0126] If L i In the middle of B, it means that the student is late and leaves early, set summary = late and leave early a i minute;
[0127] If L i At the end of B, it means the student is late, set summary = late a i minute;
[0128] If L i At the head of B, it means that the student left early, set summary = leave early a i minute;
[0129] If L i If not in B, set summary = absenta i minute.
[0130] For example, Figure 5 A flow chart of a method for marking attendance summary provided in an embodiment of the present application, such as Figure 5As shown, first set the initialization variables. i is the loop variable, and its initial value is 1; the list [(c1,L1),(c2,L2),...,(c m ,L m )] extract the student list P; B is the complete set of time slice end times, SEG_LEN is the time slice length (minutes), SEG_NUM is the number of time slices / class, SEG_NUM = class length (minutes) / SEG_LEN length (minutes).
[0131] Loop through the elements of the list that appear in the time slice (c i ,L i ).
[0132] If L i The length of SEG_NUM is equal to SEG_NUM, which means that the current student appears at least once in each time slice, and set Summary = Normal; otherwise L i is a proper subset of B, continue.
[0133] Calculate the duration of absencea i =(length of B – L i length)*time slice length.
[0134] If L i In the middle of B, it means the student is late and leaves early, set summary = late and leave early a i minutes; otherwise continue.
[0135] If L i At the end of B, it means the student is late, set summary = late a i minutes; otherwise continue.
[0136] If L i At the head of B, it means the student left early, set summary = leave early a i minutes; set summary = absent a i minute.
[0137] If L i If not in B, set summary = absent a i minute.
[0138] For example, many programming languages provide string functions such as endswith, startswith, and in, which can be used to determine whether L i In position B.
[0139] In an optional implementation, taking Python as an example, Figure 6A code comment diagram provided for an embodiment of the present application, wherein / / is followed by a code comment. Read the class list from the face database and find a list of students Q who have never appeared in the class. "-" is a difference operation of the list, taking the complement of P relative to the class list. Each student c in Q is marked with summary = absent.
[0140] For example, Figure 7 A flowchart of another method for generating attendance summaries based on global traceability provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, when the current time is greater than the class start time, attendance begins. Use target detection technology to identify the head, and then use face recognition technology to identify the student identity. If the current time is greater than the class end time, when the face recognition fails in the classroom picture (the identity is empty), try to use the identity of the head frame in a similar position in other classroom pictures as the identity of the student whose face recognition failed. According to the generated student appearance list, after compression according to the time slice, a time slice appearance list of the students is generated. According to the generated time slice appearance list, check the presence of students at the beginning and end of the class, and set the attendance summary with attendance category and absence duration.
[0141] For example, Figure 8 to Figure 13 Six possible summaries are shown in the figure. If a class has 50 minutes (9:00-9:50), SEG_NUM (number of time slices / class) = 5, then the time slice (SEG_LEN) = 10 (minutes), and there are 6 possible summaries. The first one: Summary = Normal; the second one: Summary = 20 minutes late; the third one: Summary = 10 minutes early; the fourth one: Summary = 20 minutes late and early; the fifth one: Summary = 20 minutes absent; the sixth one: Summary = truant.
[0142] This embodiment solves the problem of missed inspections caused by students lowering their heads, thereby improving the completeness rate; it solves the problem of statistical fluctuations caused by students occasionally leaving, thereby improving the credibility of the attendance summary. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0143] The embodiment of the present application also provides an attendance summary generation device based on global traceability, which may include: an identification module, used to identify the location and identity of students in classroom photos at different times, and construct an appearance list of students; an identity inference module, used to infer the identity of students who failed face recognition based on global traceability; a compressed attendance record module, used to compress according to time slices into a time slice appearance list, and compare the attendance of students in different time slices; a marked attendance summary module, used to generate an attendance summary with attendance category and absence duration.
[0144] Exemplarily, the recognition module is specifically used to: if the current time is greater than the class start time, collect classroom photos according to a preset period; identify the student's location and identity through the classroom photos; if the current time is greater than the class end time, construct a student appearance list based on the student's location and identity at different times.
[0145] The embodiment of the present application also provides an attendance summary generation device based on global traceability, including: a processor and a memory, wherein the memory stores executable program instructions, and when the processor calls the program instructions in the memory, the processor is used to: execute Figure 1 to Figure 7 The steps of the attendance summary generation method based on global traceability.
[0146] The present application also provides a computer-readable storage medium for storing a program, which is executed when the program is executed. Figure 1 to Figure 7 The steps of the attendance summary generation method based on global traceability.
[0147] It should be noted that those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "platform" herein.
[0148] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When at least one processor of a user device executes the computer-executable instructions, the user device executes the above-mentioned various possible methods. Among them, the computer-readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also exist in a communication device as discrete components.
[0149] The present application also provides a program product, which includes a computer program. The computer program is stored in a readable storage medium. At least one processor of the server can read the computer program from the readable storage medium. At least one processor executes the computer program so that the server implements any method of the above-mentioned embodiments of the present invention.
[0150] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0151] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A method for generating attendance summaries based on global traceability, characterized in that: include: Identify the location and identity of students in classroom photos at different moments and construct a list of students’ appearances; Infer the identity of students who failed face recognition based on global tracing; Compress the time slots into a time slot appearance list and compare the students' attendance in different time slots; Generate attendance summaries with attendance categories and absence duration.
2. The method for generating attendance summary based on global traceability according to claim 1, characterized in that: Identify the location and identity of students in classroom photos at different moments and construct a list of students' appearances, including: If the current time is greater than the class time, class photos are collected according to the preset cycle; identifying the location and identity of students from said classroom photograph; If the current time is greater than the class end time, a student appearance list is constructed based on the student's location and identity at different times.
3. The method for generating attendance summary based on global traceability according to claim 2, characterized in that: Identify the location and identity of students from said classroom photograph, including: By using target detection technology, the head frame of each student is found from the classroom photos at different times; Separating the head image of each student based on the coordinates of the head frame; The face recognition technology is used to identify the head image and output the location and identity of the students at different times.
4. The method for generating attendance summary based on global traceability according to any one of claims 1 to 3, characterized in that: The identities of students whose face recognition failed are inferred based on global traceability, including: Assume that the student's appearance list is recorded as: [(1,R1),(2,R2),…,(k,R k )]; where R j represents all the head frames and student identities that have been successfully recognized at the jth moment, j = 1, 2, ..., k; the time interval for collecting classroom photos is 1 minute, and the class length is k, in minutes; The constructed face failure list is recorded as: [(bb1,t1),(bb2,t2),…,(bb n ,t n )]; among them, bb i Indicates the head frame that failed to be recognized at the i-th moment, i = 1, 2, ..., n, n represents the number of times face recognition failed; If i is less than or equal to n, j is less than or equal to k, and j is not equal to t i When , determine whether d is less than or equal to |R j |, where t i represents the moment of collecting the i-th classroom photo; |R j | indicates R j The length of R j The index of the element; If d is less than or equal to |R j |, then loop to process R j |R j | element (b j d ,c j d ); if c is satisfied j d In R ti does not exist in b j d With bb i The distance <= ε, where b j d Represents R j The d-th head frame, c j d Represents R j The student identity of the d-th head frame, R ti Indicates the tth i All face frames and identities that have been successfully recognized at the moment, ε represents the experience value; Then find the identity of the students in the similar position, and put (bb i ,c j d ) added to t i List of students appearing at the moment R ti In the above figure, the identities of the students who failed the face recognition are inferred.
5. The method for generating attendance summary based on global traceability according to claim 1, characterized in that: Compressed into a time slice appearance list according to the time slice, including: Group by student identity, generate i and the corresponding time series T i The student appearance list composed of i represents the identity of the i-th student, T i represents all the successful face recognition times of the i-th student; Loop through each element in the student list (c i ,T i ); Starting from 1, use L i Save T i The compressed time slices appear in a list, and L i The initial value of is empty; among them, L i represents the time slice of all successful face recognition times of the i-th student; Cycle Processing T i Each element t in ij , and calculate t ij The end time of the time slice seg_end, and insert seg_end into L i ; where t ij represents the time when the jth face recognition of the i-th student was successfully performed; For L i Remove duplicate elements and sort in ascending order; At the end of the loop, use L i Update T i , and output the student's time slice appearance list, where L i T i A compressed version of L i The length is less than T i Length.
6. The method for generating attendance summary based on global traceability according to claim 5 is characterized in that: Generate attendance summaries with attendance categories and absence duration, including: Extract the list of students from the input time slice appearance list; Loop through the elements of the time slice list (c i ,L i ); If L i The length of L is equal to SEG_NUM, which means that the current student appears at least once in each time slice, and the summary is set to normal; if L i The length of is not equal to SEG_NUM, which means L i is a proper subset of B; Calculate the duration of absencea i =(length of B – L i length)*time slice length; where B represents the complete set of time slice end times, SEG_NUM = class length / SEG_LEN length; SEG_LEN represents the time slice length, and SEG_NUM represents the number of time slices / class; If L i In the middle of B, it means that the student is late and leaves early, set summary = late and leave early a i minute; If L i At the end of B, it means the student is late, set summary = late a i minute; If L i At the head of B, it means that the student left early, set summary = leave early a i minute; If L i If not in B, set summary = absenta i minute.
7. A device for generating attendance summary based on global traceability, characterized in that: include: A recognition module is used to identify the location and identity of students in classroom photos at different moments and build a list of students’ appearances; The identity inference module is used to infer the identity of students who failed face recognition based on global traceability; The compressed attendance record module is used to compress the attendance records into a time slot appearance list according to the time slot and compare the attendance of students in different time slots; Tag Attendance Summary module to generate attendance summary with attendance category and absence duration.
8. The attendance summary generation device based on global traceability according to claim 7 is characterized in that: The identification module is specifically used for: If the current time is greater than the class time, class photos are collected according to the preset cycle; identifying the location and identity of students from said classroom photograph; If the current time is greater than the class end time, a student appearance list is constructed based on the student's location and identity at different times.
9. A device for generating attendance summary based on global traceability, characterized in that: include: A processor and a memory, wherein the memory stores executable program instructions, and when the processor calls the program instructions in the memory, the processor is used to: Execute the steps of the method for generating attendance summary based on global traceability as described in any one of claims 1 to 6.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the steps of the attendance summary generation method based on global traceability described in any one of claims 1 to 6 are implemented.
