Personnel information determination method and apparatus
Identifying abnormal personnel through the correlation of image frames and heat maps, combined with the super-resolution algorithm and facial feature extraction model, solves the problem of inefficiency in manually measuring employee body temperature, and achieves fast and accurate identification and management of abnormal personnel.
Patent Information
- Application Number
- PCT/CN2023/085702
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-03
AI Technical Summary
In enterprise management, manual measurement of employee body temperature is inefficient, especially when there are a large number of employees, and it is difficult to quickly count those with abnormal body temperatures.
By acquiring image frames and multiple human body temperatures in the target area, using face detection and heat map correlation, we can identify and determine abnormal people, including those who are not wearing masks and have abnormal body temperatures. We use super-resolution algorithms to improve image clarity and identify and identify abnormal people through face detection and heat map correlation. The facial feature extraction model determines identity information.
It achieves rapid and imperceptible measurement of personnel body temperature, improves management efficiency, reduces manual measurement time, and can identify and prompt abnormal personnel information in real time.
Smart Images

Figure CN2023085702_03102024_PF_FP_ABST
Abstract
Description
Method and device for determining personnel information Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for determining personnel information. Background Art
[0002] In the process of enterprise management, it is often necessary to collect relevant information about employees. For example, information about employees' arrival and departure times, the density of people in certain areas or time periods, etc. In this way, the enterprise can be managed based on relevant information about employees.
[0003] In some situations, it's necessary to measure employee temperatures using a thermometer to keep statistics. Typically, staff manually measure employees' temperatures using a thermometer and record any abnormal temperatures. However, manual measurement can be inefficient for large numbers of employees.
[0004] Summary of the Invention
[0005] In one aspect, a method for determining personnel information is provided. The method comprises: acquiring an image frame of a target area and multiple body temperatures, the image frame including facial images of multiple people within the target area. Based on the location information of the multiple people, the facial images of the multiple people are associated with the multiple body temperatures to obtain the body temperature of each person within the target area. Based on the facial images and body temperatures of the multiple people in the target area, information about abnormal people within the target area is determined, where abnormal people include people not wearing masks and / or people whose body temperatures exceed a preset temperature range.
[0006] In some embodiments, the method further includes: identifying the image frame of the target area to obtain a facial recognition result for each of the multiple persons. The facial recognition result includes position information of the person's facial image in the image frame. The above-mentioned "associating the multiple persons with multiple body temperatures based on the position information of the multiple persons to obtain the body temperature of each person in the target area" may specifically include: associating the multiple persons' facial images with multiple body temperatures based on the position information of the multiple persons' facial images in the image frame to obtain the body temperature of each person in the target area.
[0007] In some embodiments, the aforementioned "associating multiple facial images of multiple persons with multiple body temperatures based on position information of the facial images of the multiple persons in the image frame" may specifically include: based on the position information of the facial images of the multiple persons in the image frame and the position information of the multiple body temperatures in a thermal map of the target area, associating facial images with the same position information with the body temperatures. The thermal map of the target area corresponds to the same viewing angle as the image frame.
[0008] In some embodiments, the aforementioned "determining information about abnormal individuals within a target area based on facial images and body temperatures of multiple individuals within the target area" may specifically include: inputting a facial image of any of the multiple individuals into a mask detection model to determine whether the individual is wearing a mask. The mask detection model is capable of detecting whether a mask is worn in facial images at different posture angles. If the individual is not wearing a mask and their body temperature exceeds a preset threshold, the individual is determined to be abnormal, and their identity information is determined based on their facial image.
[0009] In some embodiments, the method further includes: if the clarity of the person's facial image is below a threshold, super-resolution processing is performed on the person's facial image according to a preset super-resolution algorithm to obtain a facial image with a clarity above the threshold. The aforementioned "determining information about abnormal persons in the target area based on the facial images and body temperatures of multiple persons in the target area" may specifically include: determining whether the person is abnormal based on the facial images and body temperatures of the person having a clarity above the threshold.
[0010] In some embodiments, the method further includes: inputting the image frame into a face detection model to obtain a face detection frame for each person in the image frame, and inputting the image frame into a face key point detection model to obtain multiple key points of the face of each person in the image frame. For each person in the multiple persons, based on the face detection frame and the multiple key points of the facial image, a facial image of the person is obtained from the image frame in the target area, thereby obtaining a facial image of each person in the multiple persons.
[0011] In some embodiments, the above-mentioned "obtaining a facial image of a person from an image frame in a target area based on a face detection frame and multiple key points of the person's face" may specifically include: determining a mapping relationship between multiple key points of the person's face and multiple key points of a preset face template; correcting position information of the face detection frame in the image frame based on the mapping relationship to obtain a corrected face detection frame; and determining the image included in the corrected face detection frame as the facial image of the person.
[0012] In some embodiments, the method further includes: obtaining a head detection frame in the image frame. If the number of head detection frames in the image frame is greater than the number of face detection frames, determining that there is no head detection frame matching the face image among the head detection frames, and deleting the human body temperature having the same position information as the head detection frame from the plurality of human body temperatures.
[0013] In some embodiments, the above-mentioned "determining the identity information of an abnormal person based on their facial image" may specifically include: inputting the facial image of the abnormal person into a facial feature extraction model to obtain a facial feature code of the abnormal person, where the facial feature extraction model is capable of extracting facial feature codes of facial images of people wearing masks and people not wearing masks. The identity information of the abnormal person is determined based on the facial feature code of the abnormal person.
[0014] In some embodiments, the above-mentioned “determining the identity information of the abnormal person based on the facial feature code of the abnormal person” specifically includes: matching the facial feature code of the person with multiple facial feature codes in a preset facial feature library, wherein the preset facial feature library includes multiple facial feature codes and identity information corresponding to each facial feature code. If there is a target facial feature code that matches the facial feature code of the abnormal person in the preset facial feature library, the identity information corresponding to the target facial feature code is determined as the identity information of the abnormal person. If there is no facial feature code that matches the facial feature code of the abnormal person in the preset facial feature library, the identity information of the abnormal person is set to the preset identity information.
[0015] In some embodiments, the face recognition result also includes attribute information of the person, and the method also includes: outputting prompt information, which is used to prompt that there are abnormal people in the target area and one or more of the abnormal person's body temperature, identity information, attribute information, and whether he or she is wearing a mask.
[0016] On the other hand, a device for determining personnel information is provided, which includes an acquisition unit, a processing unit, and a determination unit.
[0017] The acquisition unit is configured to acquire an image frame of a target area and multiple body temperatures, the image frame including facial images of multiple people located in the target area. The processing unit is configured to, based on the location information of the multiple people, associate the facial images of the multiple people with the multiple body temperatures to obtain the body temperature of each person in the target area. The determination unit is configured to, based on the facial images and body temperatures of the multiple people in the target area, determine information about abnormal people in the target area, wherein abnormal people include people not wearing masks and / or people whose body temperatures exceed a preset temperature range.
[0018] In some embodiments, the processing unit is further configured to: recognize the image frame of the target area to obtain a facial recognition result for each of the multiple people. The facial recognition result includes position information of the person's facial image in the image frame. The processing unit is specifically configured to: associate the facial images of the multiple people with multiple body temperatures based on the position information of the facial images of the multiple people in the image frame to obtain the body temperature of each person in the target area.
[0019] In some embodiments, the processing unit is specifically configured to: associate facial images with the same position information with the body temperatures based on the position information of the facial images of multiple people in the image frame and the position information of the body temperatures in the thermal map of the target area, wherein the thermal map of the target area corresponds to the same viewing angle as the image frame.
[0020] In some embodiments, the determination unit is specifically configured to: input a facial image of an abnormal person among a plurality of persons into a mask detection model to determine whether the abnormal person is wearing a mask, wherein the mask detection model is capable of detecting whether a facial image at different posture angles is wearing a mask. If the person is not wearing a mask and the person's body temperature exceeds a preset threshold, the person is determined to be an abnormal person, and the person's identity information is determined based on the facial image of the person.
[0021] In some embodiments, the processing unit is further configured to: if the clarity of the person's facial image is lower than a threshold, perform super-resolution processing on the person's facial image according to a preset super-resolution algorithm to obtain a facial image with a clarity higher than the threshold. The determination unit is specifically configured to: determine whether the person is an abnormal person based on the facial image with a clarity higher than the threshold and the body temperature of the person.
[0022] In some embodiments, the processing unit is further configured to: input the image frame into a face detection model to obtain a face detection frame for each person in the image frame, and input the image frame into a face key point detection model to obtain multiple key points of the face of each person in the image frame. The acquisition unit is further configured to: for each person among the multiple persons, based on the face detection frame and multiple key points of the facial image of the person, acquire the facial image of the person from the image frame in the target area, thereby acquiring a facial image of each person among the multiple persons.
[0023] In some embodiments, the acquisition unit is specifically configured to: determine a mapping relationship between multiple key points of the person's face and multiple key points of a preset face template; based on the mapping relationship, correct the position information of the face detection frame in the image frame to obtain a corrected face detection frame; and determine the image included in the corrected face detection frame as the face image of the person.
[0024] In some embodiments, the acquisition unit is further configured to: acquire a head detection frame in the image frame. The processing unit is further configured to: if the number of head detection frames in the image frame is greater than the number of face detection frames, determine that there is no head detection frame matching the face image among the head detection frames, and delete the human body temperature with the same position information as the head detection frame from the multiple human body temperatures.
[0025] In some embodiments, the determining unit is specifically configured to input a facial image of an abnormal person into a facial feature extraction model to obtain a facial feature code for the abnormal person, where the facial feature extraction model is capable of extracting facial feature codes for facial images of people wearing masks and people not wearing masks. The abnormal person's identity information is determined based on the facial feature code.
[0026] In some embodiments, the determination unit is specifically configured to match the facial feature code of the abnormal person with multiple facial feature codes in a preset facial feature library, where the preset facial feature library includes multiple facial feature codes and identity information corresponding to each facial feature code. If a target facial feature code that matches the facial feature code of the abnormal person exists in the preset facial feature library, the identity information corresponding to the target facial feature code is determined as the identity information of the abnormal person. If a facial feature code that matches the facial feature code of the person does not exist in the preset facial feature library, the identity information of the abnormal person is set to the preset identity information.
[0027] In yet another aspect, a device for determining personnel information is provided, comprising a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute a computer program or instruction to implement the method for determining personnel information according to the first aspect or any embodiment of the first aspect.
[0028] In another aspect, a monitoring system is provided, comprising the determination device of the above aspect, one or more cameras, and one or more human body thermometers, wherein the determination device is in communication with the one or more cameras and the one or more human body thermometers, respectively. Different cameras are used to capture image frames of different areas, and each area is provided with a camera and a human body thermometer. The camera provided in each area has the same range of capture as the human body thermometer. The human body thermometer is used to collect human body temperatures in the area.
[0029] In some embodiments, the monitoring system further includes a black body, which can be used to calibrate the measurement accuracy of a human body thermometer.
[0030] In some embodiments, the monitoring system further includes a display device for displaying one or more of the identity information, body temperature, attribute information, and whether or not each person in the area is wearing a mask.
[0031] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, which, when executed on a computer (eg, a server), cause the computer to execute the method for determining personnel information as described in any of the above embodiments.
[0032] In another aspect, a computer program product is provided, comprising computer program instructions, which, when executed on a computer (eg, a server), cause the computer to execute the method for determining personnel information as described in any one of the above embodiments.
[0033] In another aspect, a computer program is provided. When the computer program is executed on a computer (eg, a server), the computer program enables the computer to execute the method for determining personnel information as described in any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] To more clearly illustrate the technical solutions of the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings. Furthermore, the drawings described below are schematic diagrams and are not intended to limit the actual dimensions of the products, actual processes of the methods, actual timing of signals, and the like involved in the embodiments of the present disclosure.
[0035] FIG1 is a block diagram of a monitoring system according to some embodiments;
[0036] FIG2 is a schematic diagram of a display interface of a display device according to some embodiments;
[0037] FIG3 is a block diagram of a monitoring system according to some embodiments;
[0038] FIG4 is a schematic diagram of a method for determining identity information of a person according to some embodiments;
[0039] FIG5 is a schematic diagram of a method for enhancing a facial image of a person according to some embodiments;
[0040] FIG6 is a block diagram of layers of a convolutional network according to some embodiments;
[0041] FIG7 is a flowchart of a method for determining personnel information according to some embodiments;
[0042] FIG8 is a schematic diagram of a facial image and multiple key points of a face according to some embodiments;
[0043] FIG9 is a schematic diagram of an image frame and a thermal image according to some embodiments;
[0044] FIG10 is a schematic diagram of a method for acquiring a facial image according to some embodiments;
[0045] FIG11 is a schematic diagram of a face image according to some embodiments;
[0046] FIG12 is a flowchart of a method for determining personnel information according to some embodiments;
[0047] FIG13 is a schematic diagram of a model generated by an image super-resolution algorithm based on multi-networked back-projection according to some embodiments;
[0048] FIG14 is a block diagram of an identifier according to some embodiments;
[0049] FIG15 is a schematic diagram of a facial image and a facial image after super-resolution processing according to some embodiments;
[0050] FIG16 is a flowchart of a method for determining personnel information according to some embodiments;
[0051] FIG17 is a structural diagram of a device for determining personnel information according to some embodiments;
[0052] FIG18 is a structural diagram of a device for determining personnel information according to some embodiments. DETAILED DESCRIPTION
[0053] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the embodiments described are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.
[0054] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and its other forms, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open, inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to indicate that a particular feature or characteristic associated with the embodiment or example is included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features or characteristics may be included in any one or more embodiments or examples in any appropriate manner.
[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0056] When describing some embodiments, the expressions "coupled" and "connected" and their derivatives may be used. For example, when describing some embodiments, the term "connected" may be used to indicate that two or more components are in direct physical or electrical contact with each other. For another example, when describing some embodiments, the term "coupled" may be used to indicate that two or more components are in direct physical or electrical contact. However, the term "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited to the contents of this document.
[0057] “At least one of A, B and C” has the same meaning as “at least one of A, B or C” and both include the following combinations of A, B and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B and C.
[0058] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.
[0059] As used herein, the term "if" is optionally interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined that" or "if [stated condition or event] is detected" are optionally interpreted to mean "upon determining" or "in response to determining" or "upon detecting [stated condition or event]" or "in response to detecting [stated condition or event]," depending on the context.
[0060] The use of "adapted to" or "configured to" herein is intended to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.
[0061] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values may, in practice, be based on additional conditions or values beyond those stated.
[0062] Personnel information is crucial to a company's survival and development, so its management is crucial. For example, in a company or factory, employee attendance statistics require the time they arrive and leave the office. Another example is a shopping mall, where the number of people present can be collected and used to calculate the number of customers. This data allows managers to manage the mall, avoid overcrowding, and improve the customer experience.
[0063] In some scenarios, for safety reasons, it is also necessary to collect the body temperature of personnel / customers to determine whether there are any personnel / customers with excessively high body temperatures.
[0064] Typically, managers can use a thermometer to measure the body temperature of employees or customers and record the temperature of each employee or customer. In addition, in some cases, it is also necessary to record employee or customer information (such as name, work number, gender, etc.) so that employees can be managed based on the recorded information.
[0065] However, when there are a large number of employees or customers whose temperatures need to be measured, it is inefficient if managers use thermometers to measure the temperatures of each employee or customer one by one.
[0066] In one possible implementation, to quickly obtain personnel information, facial detection can be used to identify the employee or customer's face image and then obtain the corresponding information. However, in some scenarios, employees or customers may also wear masks, which increases the difficulty of facial image recognition.
[0067] In view of this, a personnel information management method and measurement system are provided. An image frame in a target area is acquired by a camera device, and the head and face of the person in the image frame are detected to determine the position information of the face in the image frame. Then, multiple key points of the face in the image frame are extracted, and based on the multiple key points of the face and the position information of the face, the face image of the person is extracted from the image frame. After obtaining the face image of the person, the face image of the person is detected to determine whether the person is wearing a mask, and attribute recognition and feature recognition are performed on the face image of the person to obtain the information of the person in the image frame. For example, the information of the person includes the identity information, attribute information (such as age, gender, etc.) of the person, etc.
[0068] Furthermore, after obtaining the body temperature of each person in the image frame, management is performed based on the person's information and body temperature. For example, the number of people not wearing masks and those with abnormal body temperatures can be counted, and warning information / prompt information such as not wearing masks, excessive crowd density, and high body temperature can be output. In this way, in this embodiment of the application, the body temperature of people can be measured in a non-perceptible manner, thereby managing personnel information.
[0069] Among them, a person with an abnormal body temperature may refer to a person whose body temperature exceeds a preset temperature range. The preset temperature range can be set as needed, for example, it can be 37 degrees Celsius to 39 degrees Celsius, or a range including 37 degrees Celsius to 39 degrees Celsius, or a range between 37 degrees Celsius and 39 degrees Celsius.
[0070] The following will describe in detail the implementation of the embodiment of the present application in conjunction with the accompanying drawings.
[0071] As shown in Figure 1, Figure 1 is a monitoring system provided by an embodiment of the present application. The monitoring system may include one or more cameras, one or more human body thermometers, and a server. The server is respectively connected to one or more cameras, one or more human body thermometers, and a display device in a communication manner. For example, the connection may be made by wired or wireless means. Among them, the wireless means may include Bluetooth, wireless fidelity (WIFI), a communication network (such as the fifth generation (5th generation, 5G), etc. The wired means may include a network cable, a system bus, etc.
[0072] The one or more cameras may be set in different areas to capture videos or image frames of the areas.
[0073] In some scenarios, the one or more cameras may be set up at entrances, corridors, or other locations where people pass by, such as enterprises, factories, or supermarkets.
[0074] The human body thermometer can be used to detect the temperatures of multiple people in the area. For example, the human body thermometer can be set up in the same area as the camera. In other words, the human body thermometer and the camera can be set up in the same area, and the human body thermometer and the camera have the same shooting range.
[0075] In some examples, the human body thermometer may be an infrared thermometer. The parameters of the human body thermometer may be set as needed and are not limited. For example, the parameters of the human body thermometer may include one or more of temperature measurement accuracy, the number of temperature measurement targets, temperature measurement response time (the time between the start of measurement and the measurement of the human body temperature), temperature measurement distance, and the types / transmission protocols of supported connected devices (or servers).
[0076] For example, the parameters of a human body thermometer may include: temperature measurement accuracy ≤ 0.3 degrees Celsius (℃); the number of temperature measurement targets is 16; temperature measurement response time ≤ 30 milliseconds; temperature measurement distance is 3 meters to 4 meters; and support for access to multiple types of devices (or servers).
[0077] In other examples, a human body thermometer can capture a thermal image of an area. The thermal image can include multiple human body temperatures in the area. For example, the thermal image can use different colors to represent different temperatures. For details, please refer to the existing technology and will not be described in detail.
[0078] In other examples, the human body thermometer and camera can be integrated into a single device. The device can collect temperature information within a certain area using infrared rays and capture image frames of the area using the camera. In this way, the device can generate a thermal image of the area based on the collected temperature information and image frames.
[0079] In some embodiments, as shown in FIG1 , the monitoring system may further include one or more display devices. The one or more display devices are communicatively connected to the server.
[0080] The display device may also be referred to as a display or screen. The display device can be used to display information about people within an area. For example, the display device can display real-time image frames captured by a camera, multiple body temperatures measured by a thermometer (e.g., thermal images), and information about people within the area.
[0081] In some examples, as shown in FIG2 , an embodiment of the present application provides a display interface that can display image frames and thermal images of a certain area, as well as information about multiple people located in the area.
[0082] It should be noted that Figure 2 may also include other information, such as the total number of people in the area, the number of people not wearing masks, the density of people in the area, etc.
[0083] In one application scenario, an enterprise, factory, or supermarket may be equipped with one or more display devices. The one or more display devices may be ultra-high-definition terminals or ultra-wide 178° visual display devices. The size of each display device can be set as needed, and the sizes of the one or more display devices may be the same, different, or partially the same, without limitation. For example, the sizes of the display devices may include 32 inches, 46 inches, 55 inches, 65 inches, 75 inches, 86 inches, etc.
[0084] In some scenarios, a company, factory, or supermarket may have multiple display devices. One display device may be set up in one area, and the display device may be used to display information about people in that area.
[0085] In some other scenarios, a company, factory, or supermarket may have a single display device. The display interface shown in Figure 2 may also include multiple sub-interfaces and a personnel information display interface. Each sub-interface may display an image frame and corresponding thermal image of an area. The personnel information display interface may be used to display information about abnormal personnel within the multiple areas.
[0086] In some examples, the display device can also continuously update the information of people in the area. For example, the information of abnormal people can be updated in real time.
[0087] For example, the display device can display the information of abnormal persons in each image frame. When the image frame captured by the camera is updated, the display device can display the latest image frame captured by the camera and the information of abnormal persons in the latest image frame.
[0088] For another example, the display device can add information about an abnormal person in the next image frame based on the detection results of the previous image frame. For example, if the server detects the presence of abnormal person A in image frame a captured by the camera at the first moment, the server can display information about abnormal person A on the display device. If the server then detects the presence of abnormal person B in image frame b captured by the camera at the second moment, the server can display information about both abnormal person A and abnormal person B on the display device. The second moment occurs after the first moment. In this way, the server can continuously update the information displayed on the display, facilitating statistical analysis and management by administrators.
[0089] Among them, the server can be used to manage personnel information based on the video or image frames captured by one or more cameras, and multiple human body temperatures measured by one or more human body thermometers. For example, the server can perform face recognition on the image frames captured by the camera, and count the information and number of people wearing masks and those not wearing masks, the information and number of people with abnormal body temperatures, and other information. The information of the person may include one or more of attribute information, identity information (such as identity document identification number (ID), name, work number, employee or visitor, etc.), location information, etc. Abnormal human body temperature may refer to a person's body temperature exceeding a preset temperature range. Visitor refers to the identity information of the person output when the server fails to recognize the identity of the person.
[0090] In some scenarios, the server can be a physical server or a cloud server. The server can be a standalone server or a cluster server, without restriction.
[0091] In one example, the measurement system provided by the embodiments of the present application may further include a blackbody. The blackbody can be a standard temperature source. When the human body thermometer is affected by environmental factors, the blackbody can be used for calibration.
[0092] In one possible implementation, as shown in Figure 3, the server may include a passenger flow statistics module, an attendance module, an alarm module, and a data analysis module. The connection between these modules can be seen in Figure 3 and will not be described in detail. The functions of each module are described below.
[0093] 3-1. Passenger flow statistics module.
[0094] The passenger flow counting module can be used to count the number of people in an area. For example, the passenger flow counting module can be used to count the number of people who are not wearing masks and the number of people who are wearing masks in an area.
[0095] 3-2. Attendance module.
[0096] The attendance module can be used to obtain the face image in the image frame of the area, the recognition result of the face image, the position information of the face detection frame in the image frame, etc. The recognition result of the face image can include the identity information corresponding to the face image.
[0097] 3-3. Alarm module.
[0098] The alarm module can be used to generate abnormal body temperature alarms and mask-not-wearing alarms. The abnormal body temperature alarm can be used to alert users that a person in the area has a body temperature above a preset range. The mask-not-wearing alarm can be used to alert users that a person in the area is not wearing a mask, or that the number of unmasked people exceeds a preset number. The preset number can be set as needed, for example, 3 or 4, with no limitation.
[0099] 3-4. Data analysis module.
[0100] The data analysis module can be used to determine whether to output alarm information / prompt information based on the body temperature and face temperature of people in the area, and when it is determined to output alarm information / prompt information, transmit the alarm information / prompt information to the display device.
[0101] Based on the above monitoring system, the functions of mask detection, facial recognition of people wearing masks, contactless real-time temperature measurement, passenger flow analysis, data analysis, etc. are realized, and the analysis screen is intuitively presented through ultra-high-definition display devices, and abnormal information can be scrolled.
[0102] It should be noted that while the examples in this application illustrate abnormal persons as those not wearing masks, abnormal persons may also include those not wearing other safety items. For example, abnormal persons may also include those not wearing helmets or protective glasses. When abnormal persons are other people not wearing safety items, face detection in this application may refer to detecting whether a face image is wearing a safety item. For example, the mask detection model may be replaced with a helmet detection model or a protective glasses wearing model.
[0103] In one embodiment, as shown in FIG4 , the face recognition process may include S401 to S406 .
[0104] S401: Train multiple training data according to a preset algorithm to obtain a facial feature extraction model.
[0105] The training data may include facial images and corresponding facial feature codes. Different facial images correspond to different facial feature codes. The preset algorithm can be set as needed. For example, the preset algorithm can be a two-headed residual attention mechanism network, etc., without limitation. The specific training process can refer to the technical solution shown in Figure 5 below and is not described in detail here.
[0106] The facial feature extraction model may be capable of extracting facial feature codes for facial images of people wearing masks and those not wearing masks. For example, the facial feature codes for facial images may be multi-dimensional vectors or arrays, such as 512-dimensional vectors.
[0107] In one example, the server may obtain multiple training data from the network, or may obtain multiple training data in response to an upload operation.
[0108] S402: Input multiple facial images with identity information into a facial feature extraction model to obtain facial coding features of each facial image to obtain multiple facial feature codes.
[0109] The multiple facial images with identity information may be images including clear faces, such as ID photos.
[0110] In one example, a server can obtain multiple facial images from a company's or factory's human resources system or personnel management system. These facial images can be employee ID photos uploaded by the company's management. Each facial image corresponds to an identity information or identifier (such as an ID, name, or work number).
[0111] In one example, after obtaining the facial coding features of each facial image, the facial feature codes of the multiple facial images can be stored in a facial feature library, and a mapping relationship between the facial images and the corresponding facial feature codes can be established.
[0112] S403: Input the face image to be recognized into a face feature extraction model to obtain a face feature code of the face image to be recognized.
[0113] The face image to be recognized may refer to a face image captured from an image frame within the region. Specific details may be referred to the description of the following embodiment, which will not be elaborated herein.
[0114] In one example, the server may determine the identity information of the person based on the facial feature code of the face image to be identified, for example, by the following steps S404 to S406.
[0115] S404: Calculate the similarity between the facial feature code of the face image to be recognized and the facial feature codes in the facial feature library.
[0116] Among them, the server can calculate the cosine distance between the facial feature code of the face image to be identified and the facial feature code in the face feature library to obtain the similarity between the facial feature code of the face image to be identified and the facial feature code in the face feature library.
[0117] If the similarity is greater than the threshold or there is a target facial feature code in the facial feature library that matches the facial feature code of the facial image to be identified, the identity information corresponding to the target facial feature code is determined as the identity information of the person to be identified, and S405 is executed; if the similarity is less than or equal to the threshold or there is no target facial feature code in the facial feature library that matches the facial feature code of the facial image to be identified, the identity information of the person to be identified is set to the preset identity information, and S406 is executed.
[0118] The threshold value can be set as needed, for example, 0.51, without limitation. The preset identity information may include visitor, stranger, etc.
[0119] S405 : Input the ID of the face image corresponding to the maximum similarity.
[0120] Among them, the facial image corresponding to the maximum similarity can refer to the facial image with the greatest similarity to the facial feature code of the facial image to be identified in the facial feature library, or the facial image in the facial feature library that matches the facial feature code of the facial image to be identified.
[0121] S406: Output prompt information indicating that no corresponding facial image is matched.
[0122] The prompt information may be used to indicate that the identity information of the person has not been identified or to indicate that the person is an abnormal person.
[0123] Based on the calculation scheme of Figure 4, after obtaining multiple training data, a model capable of extracting facial feature codes can be obtained based on the multiple training data. Then, based on the model, facial feature codes of multiple standard facial images can be obtained. In this way, for the facial image to be identified, after obtaining the corresponding facial feature code based on the model, the facial feature code can be matched with the facial feature code of the standard facial image. If the standard image cannot be matched, the unrecognizable information is output. If the standard facial image can be matched, the ID of the standard facial image is used as the ID of the facial image to be identified. In this way, the identity information of the facial image to be identified can be accurately obtained.
[0124] In some embodiments, to achieve robust recognition of facial images of people wearing and not wearing masks, in S402 above, before training the plurality of training data according to a preset algorithm to obtain a facial feature extraction model, data augmentation operations may be performed on the training data. As shown in Figure 5, the specific process may include S501 to S503.
[0125] S501. For each training data, 3D face synthesis technology can be used to generate face images of the training sample with and without masks at different postures and angles.
[0126] S502. Input the facial images of the person wearing a mask and the person not wearing a mask at different posture angles into a convolutional network to obtain facial feature codes of the facial images wearing a mask and facial feature codes of the facial images not wearing a mask.
[0127] In one example, the convolutional network may include multiple operation modules. For example, the operation module may be a BCBPCB module. Among them, a BCBPCB module may include multiple layers. For example, as shown in Figure 6, the multiple layers may include multiple batch normalization (BN) layers, multiple convolution (conv) layers, parametric rectified linear unit (PRELU) layers, coordinate attention (CA) layers, squeeze-and-excitation networks (SE) layers. The connection relationship between the multiple layers can be shown in Figure 6 and will not be repeated here. Each layer is described below.
[0128] 6-1. BN layer.
[0129] The BN layer can be used to normalize batch data. This ensures that the input sample data of each BCBPCB module has the same distribution. The input sample data can also be divided into small batches for stochastic gradient descent. Moreover, when each batch of sample data is passed to the next layer, the input data of each layer is normalized, thereby accelerating model convergence and improving the speed of model training.
[0130] 6-2. CONV layer.
[0131] Among them, the CONV layer can also be called the feature extraction layer. The CONV layer can be used for feature extraction.
[0132] 6-3. PRELU layer.
[0133] The PRELU layer can also be called an activation function layer, which can be used to provide an activation function. The PRELU layer can increase the nonlinear relationship of the network and avoid zero gradient.
[0134] 6-4. CA layer.
[0135] The CA layer mainly outputs the attention of the directional information of the training sample. The directional information can refer to the deflection angle of the face image.
[0136] 6-5, SE layer.
[0137] The SE layer mainly outputs the channel (color) information of the training sample. For example, the SE layer can output the number of channels of the training sample, the color value of the face image, etc.
[0138] S503: Fusing the facial feature codes of the face image of the person wearing the mask and the facial feature codes of the face image of the person not wearing the mask to obtain and output the fused facial feature codes.
[0139] Among them, facial features can be compatible with facial features of people wearing masks and facial features of people not wearing masks.
[0140] In one example, the server can fuse the facial feature codes of the face image of the person wearing a mask and the facial feature codes of the face image not wearing a mask by weighted averaging to obtain a fused facial feature code. That is, the facial features of the face wearing a mask and the facial features of the face not wearing a mask are compatible.
[0141] It should be noted that the dimensionality of the fused facial feature encoding is the same as that of the facial feature encoding of the face image wearing a mask and the facial feature encoding of the face image not wearing a mask. For example, both are 512-dimensional vectors or arrays. In this way, the server can be trained based on the fused facial feature encoding to obtain a model that can identify whether a face in a facial image is wearing a mask.
[0142] The model obtained based on the training process of Figure 5, since the training data of the model includes facial images of people wearing masks and not wearing masks, the model can recognize facial images of people wearing masks and not wearing masks, thereby improving the robustness of the model.
[0143] The following describes the method for determining personnel information provided in the embodiment of the present application in combination with the monitoring system shown in Figure 1 and the technical solutions of Figures 3 and 4.
[0144] It should be noted that the execution subject of the embodiment of the present application can be the server in Figure 1, or a device in the server, such as a chip or system on a chip of the server. The following uses the execution subject as an example to illustrate the method for determining personnel information provided in the embodiment of the present application.
[0145] In some embodiments, as shown in FIG7 , the method for determining personnel information provided in the embodiment of the present application may include S701 to S703 .
[0146] S701: Acquire an image frame of a target area and multiple human body temperatures.
[0147] The image frame of the target area may include facial images of multiple people located in the target area. The target area may be an area where people pass through. For example, the target area may be the entrance area of a company, factory, or supermarket.
[0148] In one example, the server may receive image frames captured by a camera disposed in a target area, and receive multiple human body temperatures measured by a human body thermometer disposed in the target area.
[0149] In another example, if the camera captures a video, the server may process the video to obtain multiple image frames of the target area.
[0150] In another example, if the human body thermometer measures a thermal image of the target area, the server can extract multiple human body temperatures from the thermal image.
[0151] In one possible implementation, after acquiring an image frame of the target area, the server can detect the image frame and obtain face detection frames and corresponding location information for the people in the image frame. Based on the location information of the face detection frame, the server can intercept the image within the face detection frame from the image frame to obtain the facial image of each person in the image frame. Based on this, the server can quickly obtain the facial image of each person in the target area based on the face detection frame.
[0152] In some scenarios, there are a large number of people in the target area, and the face of a person may be blocked by other people or the person may not have a face in the image frame. For example, the person's direction is not in the direction of the camera, resulting in the camera not being able to capture the person's facial image.
[0153] To avoid incorrect associations between facial images and body temperatures, the server can also obtain head detection frames within the image frame. For example, the server can input the image frame into the aforementioned face detection model to obtain multiple head detection frames within the image frame. In other words, the face detection model is capable of detecting both face and head detection frames within the image frame.
[0154] If the number of head detection frames in the image frame is greater than the number of face detection frames, the server can determine a head detection frame that does not have a matching face detection frame among the multiple head detection frames, and delete the human body temperature in the thermal map with the same position information as the face detection frame.
[0155] The fact that the head detection frame has no matching face detection frame may mean that there is no face detection frame in the head detection frame.
[0156] In some scenarios, a person's head may be tilted, but the facial image within the face detection frame may be abnormal. For example, the person's head may be tilted in the image frame, but the face detection frame may be horizontal (that is, the centerline of the face detection frame is perpendicular to the horizontal line of the image frame). In this case, the facial image within the face detection frame may be incomplete.
[0157] To accurately capture a person's facial image, after obtaining the face detection frame and corresponding position information for the person in the image frame, the server can re-detect the image within the face detection frame to determine the coordinate data of multiple key points of the face within the image frame. The server can then capture the facial image from the image frame based on the position information of the face detection frame and the coordinate data of multiple key points of the face within the image frame. For details, please refer to the embodiment shown in Figure 10 below, which will not be detailed here.
[0158] Among them, multiple key points of a face can be used to represent the characteristic information of the face. For example, the multiple key points may include the left eye, right eye, nose, left corner of the mouth, right corner of the mouth, etc.
[0159] In one example, the server may input an image frame into a facial key point detection model to obtain multiple key points of each face in the image frame and coordinate data of each key point.
[0160] In one possible scenario, the face in the image frame is wearing a mask. After detecting the left and right eye keypoints of the face, the server can determine the coordinate data of the nose keypoint in the face image based on the distance between the eyes and the nose. Similarly, the server can determine the coordinate data of the left and right corners of the mouth keypoints in the face image based on the distance between the eyes and the corners of the mouth.
[0161] The distance between the eyes and the nose and the distance between the eyes and the corners of the mouth can be pre-configured by the server. The server can determine the distance between the eyes and the nose and the distance between the eyes and the corners of the mouth on the face of a plurality of face image templates.
[0162] For example, as shown in FIG8 , an embodiment of the present application provides a facial image of a person wearing a mask and multiple key points in the facial image (black dots in FIG8 ).
[0163] In another possible scenario, the person in the image frame is wearing protective glasses. After detecting the nose keypoint and the mouth corner keypoint of the person's face, the server can determine the coordinate data of the left eye keypoint and the right eye keypoint of the face image based on the distance between the nose and the left and right eyes and / or the distance between the mouth corners and the left and right eyes.
[0164] In some other examples, when the clarity of a person's facial image falls below a threshold, the server can perform super-resolution processing on the person's facial image to obtain a higher-resolution facial image. This increases the accuracy of subsequent facial recognition. For details, please refer to the embodiment shown in Figure 10 below, which will not be detailed here.
[0165] S702 : Associating the multiple persons with the multiple body temperatures according to the position information of the multiple persons, and obtaining the body temperature of each person in the target area.
[0166] The position information of a person may refer to the position information of the person in the target area, or may refer to the position information of the person in the image frame of the target area (such as the position information of the face detection frame in the image frame, such as coordinate data).
[0167] In one example, a body thermometer is used to collect thermal images of an area. The server can detect the image frames captured by the camera to obtain the position information of multiple face detection frames within the image frames. It can also detect the thermal images captured by the body thermometer to obtain the position information of multiple face detection frames within the thermal images. In this way, the server can associate face detection frames with the same position information with the body temperature to obtain the body temperature at the location of the face detection frame, that is, the body temperature of the person.
[0168] Among them, the shooting range in the image captured by the camera is the same as the range collected by the human body thermometer.
[0169] In one possible implementation, the server can input an image frame of the target area into a head / face detection model to obtain the number of heads and faces in the image frame, as well as the location of the head / face detection frame. The number of heads in the image frame can be used to count the number of people in the target area. Based on the number of people in the target area, the server can calculate the density of people in the target area.
[0170] For example, as shown in FIG9 , a in FIG9 is an image frame of the target area taken by a camera, and b in FIG9 is a thermal image of the target area taken by a human body thermometer.
[0171] Combining the image frame and thermal image in Figure 9, the server can perform face detection on each image frame and thermal image, determining the face detection frames included in each. The server can then associate the positional information in the image frame with the faces in the thermal image that share the same positional information, thereby obtaining the body temperature of each person within the target area.
[0172] For example, if the position information of person 1 in the image frame is the same as the position information of person 1 ′ in the thermal image, the body temperature of person 1 ′ at the location in the thermal image is the body temperature of person 1 .
[0173] In another example, a human body thermometer is used to collect human body temperatures at multiple locations in a target area. The server can detect the image frames captured by the camera and obtain the position information of multiple face detection frames in the image frames. The server can convert the position information of the multiple face detection frames in the image frames into position information in the target area, and obtain the position information of the multiple face detection frames in the target area. In this way, the server can use the human body temperature at multiple locations collected by the human body thermometer that is the same as the position information of the face detection frame in the target area as the human body temperature corresponding to the face detection frame. That is, the human body temperature of the person.
[0174] The method for converting the position information of the multiple face detection frames in the image frame and the position information in the target area is related to the camera parameters (such as lens parameters, etc.). For details, please refer to the existing technology and will not be described in detail.
[0175] S703: Determine information about abnormal persons in the target area based on the facial images and body temperatures of multiple persons in the target area.
[0176] Among them, abnormal persons may include persons who are not wearing masks and / or persons whose body temperature exceeds a preset temperature range. The preset temperature range can refer to the above description and is not repeated here.
[0177] In one example, the server can input multiple facial images of individuals into the model described in the embodiment of FIG4 , determine whether each facial image is wearing a mask, and identify the corresponding facial feature codes. Based on the facial feature codes of the facial images, the server can determine the identity information of the individual. For details, please refer to the technical solution shown in FIG4 above and will not be elaborated on here.
[0178] Furthermore, after determining the person's information, the server can determine, based on the person's body temperature, whether there are any people in the target area whose body temperature is higher than a preset temperature range. In this way, the server can determine whether there are any abnormal people in the target area and their information based on the person's facial image and body temperature.
[0179] Based on the technical solution in Figure 7, after acquiring image frames including facial images of multiple people within the target area and multiple body temperatures within the target area, the server can associate the images of the people in the target area with their body temperatures based on the location information of the people within the target area, thereby determining the body temperature of each person within the target area. In this way, the server can accurately determine the information of abnormal people within the target area based on the facial images and body temperatures of multiple people within the target area. Compared to manual temperature measurement methods, the technical solution provided by this application can capture the images and body temperatures of multiple people at once, thereby reducing measurement time and improving measurement efficiency.
[0180] In some embodiments, as shown in FIG. 10 , in the above S701 , the method in which the server captures a facial image from an image frame based on the position information of the face detection frame and multiple key points of the face may specifically include S1001 to S1002 .
[0181] S1001. Determine a mapping relationship between multiple key points of a person and multiple key points of a preset face template.
[0182] The preset face template can be used to correct the face image. For example, the angle between the centerline of the face and the horizontal line in the preset face template is 90 degrees. The centerline of the face can refer to the left and right dividing lines of the face. The size of the face detection frame of the preset face model (i.e., length and width) is the same as the size of the face detection frame. The preset face model can be pre-configured by the server.
[0183] In one possible implementation, the server maps multiple key points on a person's face to key points of corresponding types in a preset face template based on their types. For example, the left eye of a person's face is mapped to the left eye of a preset face template, and the right eye is mapped to the right eye of a preset face template. Similarly, the nose, left corner of the mouth, and right corner of the mouth are mapped to corresponding positions in the preset face template. Based on this, the server can obtain the mapping relationship between the person's face and the preset face template.
[0184] In one example, the server can calculate the distance (e.g., Euclidean distance) between the coordinate data of multiple key points of the facial image of the person in the image frame and multiple key points of the preset facial template to obtain one or more distance values. Based on the one or more distance values, the server can determine the transformation relationship between the face and the preset facial template, and use the transformation relationship as the mapping relationship between the facial image in the image frame and the preset facial template.
[0185] The conversion relationship may be a mean or median of the one or more distance values. Based on the conversion relationship, the server may correct the coordinate data of the four vertices of the face detection frame in the image frame to obtain a corrected face detection frame.
[0186] In another example, the server can calculate the offset vector between the coordinate data of each key point of multiple key points in the facial image of a person and the key point of the corresponding type of the preset facial template to obtain one or more offset vectors, and determine the mapping relationship between the facial image in the image frame and the preset facial template based on the one or more offset vectors.
[0187] S1002: Correct the face detection frame in the image frame according to the mapping relationship to obtain a corrected face detection frame, and obtain a face image of the person from the image frame according to the corrected face detection frame.
[0188] The tilt angle of the corrected face detection frame is consistent with the tilt angle of the person's face, so that the corrected face detection frame can include the entire face area of the person.
[0189] In one example, when the mapping relationship is determined based on one or more distances, the server can correct the position information (such as the coordinate data of four vertices) of the face detection frame of the person in the image frame based on the one or more distances, and obtain a new face detection frame based on the corrected vertex coordinate data.
[0190] In another example, when the mapping relationship is determined based on one or more offset vectors, the server may offset the coordinate data of the vertices of the face detection frame of the person in the image frame based on the one or more offset vectors to obtain a corrected face detection frame.
[0191] In a possible implementation, the server may directly capture the image within the face detection frame in the image frame based on the corrected face detection frame to obtain the face image of the person.
[0192] For example, as shown in FIG11 , FIG11 shows a head image of a person and a face detection frame, and a face image captured from an image frame according to the face detection frame.
[0193] In some examples, when the image frame includes face detection frames of multiple persons, the server can respectively capture face images of the corresponding persons from the image frame according to the face detection frames to obtain face images of the multiple persons.
[0194] Based on the technical solution in Figure 10, for people whose heads are tilted in an image frame, the face detection frame can be corrected using multiple key points of the person. This allows the corrected face detection frame to accurately and comprehensively include the person's face image. This allows the server to accurately capture the face image from the image frame based on the corrected face detection frame, thus avoiding the problem of inaccurate face recognition caused by incomplete captured face images.
[0195] In some embodiments, when the distance between the camera and the person is large, resulting in the facial image captured by the camera being unclear, the server can perform super-resolution processing on the facial image of the person to obtain a facial image with higher definition, thereby improving the accuracy of facial recognition. Specifically, as shown in FIG12 , the method provided in the embodiment of the present application can also include S1201 to S1203.
[0196] S1201: Determine the clarity of a person's facial image.
[0197] The clarity of a facial image is related to the number of pixels in the facial image. For example, the more pixels a facial image contains, the higher the clarity of the facial image.
[0198] In one example, the server may determine the clarity of a person's facial image or whether super-resolution processing is required for the facial image based on the size of the face detection frame.
[0199] For example, if the size of the face detection frame is smaller than a preset size, the face image is determined to have low definition and requires super-resolution processing. If the size of the face detection frame is greater than or equal to the preset size, the face image is determined to have high definition and does not require super-resolution processing. The preset size can be set as needed, for example, 45*45 pixels.
[0200] Furthermore, if the clarity of the facial image of the person is lower than the threshold, S1202 is executed; if the clarity of the facial image of the person is higher than or equal to the threshold, S1203 is executed.
[0201] S1202: Super-resolution the facial image of the person according to a preset super-resolution algorithm to obtain a facial image with a clarity higher than a threshold.
[0202] The preset super-resolution algorithm may be a multi-network back-projection image super-resolution algorithm. Super-resolution processing of a person's facial image according to the preset super-resolution algorithm can be described as inputting the person's facial image into an image super-resolution model (also referred to as a generator), which has the function of super-resolution processing the input image. For example, the image super-resolution model is trained according to the preset super-resolution algorithm.
[0203] In one example, as shown in Figure 13, a schematic diagram of the structure of a model generated by an image super-resolution algorithm based on multi-networked back-projection is shown. The input of the model is upsampled (enlarged) to a blurred 8K image. In the process of the model generating a clear image, the model can undergo repeated upsampling (enlargement) and downsampling (reduction) operations of 2x, 4x, 8x, and 16x, and then combine the weight parameters of the same magnification that appear in the upsampling and downsampling processes to generate an 8K high-definition image with minimal loss of any magnification information.
[0204] Furthermore, in order to make the generated high-definition images close to the actual images, the generated images can be corrected by the discriminator during the sequence process of the model.
[0205] In one example, as shown in Figure 14, a schematic diagram of the structure of a discriminator provided in an embodiment of the present application is provided. The discriminator can be used to detect whether the image generated by the model (or generator) meets high-quality requirements. In Figure 14, CNN is a convolutional neural network algorithm.
[0206] For example, the discriminator can convert a 3-channel RGB image into a grayscale image in the 709 space, and then judge whether the image generated by the model (or generator) meets the high-quality requirements through normalization and autocorrelation techniques.
[0207] The input to the discriminator is image data processed through the variance normalization (VN) and shift correlator (SC) layers. The VN+SC layer performs variance normalization and calculates the Hadamard product of the image using an offset based on the image's luminance channel (converted from RGB using the BT.609 standard).
[0208] In one example, the VN+SC layer can be calculated by the formula Normalize the variance of the image Convert to a set of adjacent products k = 0, 1, ..., 48. The number of adjacent products can be set by a parameter, for example, the number of adjacent products can be 7 × 7. The number of features used in the discriminator can be 64.
[0209] In the above formula, p is the displacement offset in the i direction, q is the displacement offset in the j direction, and i and j are the coordinates of the pixel in the image frame.
[0210] In some scenarios, the discriminator can also be configured with a Gaussian filter for local mean and variance of the image frame. The kernel size of the Gaussian filter can be set as needed, for example, 7×7. The σ of the Gaussian filter can be 1.17.
[0211] In a possible implementation, the server may further control the amount of detail in the image generated in the output by using noise inputs of different resolution scales, so that the output image can better reflect real details.
[0212] The noise of different resolutions may refer to images of different pixels, and the number of pixels of the noise is the same as the number of pixels of the face image of the person.
[0213] In one example, Figure 15 shows a facial image before and after super-resolution processing. As shown in Figure 15, super-resolution can enhance the image quality of blurred faces at a distance, effectively resolving the issue of low recognition accuracy for blurred faces at a distance.
[0214] It should be noted that in the embodiments of this application, the generator's role is to generate images that meet the discriminator's identification requirements as closely as possible. The discriminator's role is to determine the authenticity of received images. Therefore, the training process of the super-resolution algorithm model is the interaction between the generator and the discriminator.
[0215] Specifically, the interaction between the generator and the discriminator involves the following: the generator outputs a positive image and inputs it into the discriminator. The discriminator determines whether the input image is real or machine-generated. If the discriminator identifies the input image as machine-generated, the generator can continue iterative training to obtain a trained generator. The trained generator continues to output a second-generation image (output), which is then input into the discriminator for the discriminator to identify the input image. Of course, the discriminator also continues iterative training to improve its accuracy in determining whether the images output by the generator are real.
[0216] Based on the above-mentioned image super-resolution algorithm, the image quality of blurred face images at a longer distance can be enhanced, effectively solving the problem of low recognition accuracy of blurred faces at a longer distance.
[0217] S1203: Input the facial image into a facial feature extraction model to obtain a facial feature code of the person, and determine the identity information of the person based on the facial feature code of the person.
[0218] The facial image may be a facial image whose definition exceeds a threshold, may be a facial image in an image frame, or may be a facial image after super-resolution processing.
[0219] Wherein, the identification information of a person is determined according to the facial feature coding of the person, and specific details can be referred to the embodiment of FIG4 above, which will not be described in detail.
[0220] Based on the technical solution of Figure 12, when the clarity of the facial image in the image frame is low, the server can process the image through an image super-resolution algorithm to obtain a facial image with a higher degree of cleanliness, thereby improving the accuracy of face recognition.
[0221] In some embodiments, after obtaining the information of the persons located in the target area, the information of the persons may also be output.
[0222] In one example, the server can count the face recognition results of the face image and the corresponding body temperature, and record the body temperature of each person.
[0223] In another example, the server can also obtain passenger flow analysis data based on the face recognition results and corresponding attribute information.
[0224] The passenger flow analysis data may be used to analyze data on people entering the target area, etc. For example, the passenger flow analysis data may include the time when people enter the target area, the number of people entering the target area within a preset time period, etc.
[0225] Furthermore, the server can also obtain multi-dimensional analysis results based on the passenger flow analysis data, for example, including personnel attendance time, whether personnel arrive and leave work on time, etc.
[0226] In another example, the server can calculate the crowd density within the target area based on the number of detected people. When the crowd density exceeds a threshold, a prompt message can be output. This prompt message can be used to indicate that there are many people in the target area. The threshold can be set as needed, for example, 20, etc., without limitation.
[0227] In another example, the server can also issue an alert for not wearing a mask based on the face recognition results and the recognition results of whether a mask is worn.
[0228] In another example, after acquiring facial images of multiple people in an image frame, the server can sort the facial images from largest to smallest based on the size of the face detection frame, generating a facial image queue. The server can then sequentially input this facial image queue into a mask detection model to determine whether each facial image is wearing a mask.
[0229] The mask detection model can be capable of detecting whether a person is wearing a mask in facial images at different poses and angles. The mask detection model can be pre-configured by the server or trained by the server. For example, the server can train the mask detection model on multiple facial images at different poses and angles using a preset algorithm. The preset algorithm can be set as needed, for example, a neural network algorithm, without limitation.
[0230] Furthermore, to reduce server pressure, the server can input the first N facial images in the facial image queue into a facial attribute recognition model to obtain attribute information corresponding to each facial image. N is a positive integer, for example, 16. In this way, the server can determine the personnel information within the area based on the facial images, attribute information, and the position information of the head / face detection frame. For example, the above-mentioned attendance module can be used to determine the personnel information within the area.
[0231] In some embodiments, as shown in FIG16 , an embodiment of the present application further provides a method for managing personnel information, which includes S1601 to S1609 .
[0232] S1601: Acquire facial images and body temperatures of people in the target area.
[0233] Among them, S1601 can refer to the description of S701 above and will not be repeated here.
[0234] S1602. Detect whether there are people who are not wearing masks based on the facial images of people in the target area.
[0235] Among them, S1602 can refer to the description of S702 above and will not be repeated here.
[0236] If there are people in the target area who are not wearing masks, execute S1603 to S1604; if there are no people in the target area who are not wearing masks, execute S1605 to S1609.
[0237] S1603: Determine the person information corresponding to the facial image of the person not wearing a mask.
[0238] The personnel information includes one or more of the personnel's location information, face screenshot, body temperature, ID, and attribute information.
[0239] In one example, the server can input an image of a face without a mask into the facial feature extraction model to obtain a facial feature code for the face image. Then, based on the facial feature code, the server can determine the person information corresponding to the face image. For details, please refer to the description of the embodiment shown in Figure 4 above and will not be repeated here.
[0240] S1604: Output the personnel information corresponding to the facial image of the person not wearing a mask and the alarm for not wearing a mask.
[0241] Among them, the mask-not-wearing alarm can be used to prompt that there are people who are not wearing masks in the target area.
[0242] In one example, the server can display a facial image of a person not wearing a mask and the corresponding personal information through the display device in Figure 1.
[0243] S1605: Determine whether there is a person in the target area whose body temperature is higher than a preset temperature range based on the body temperatures of the people in the target area.
[0244] If there is a person whose body temperature is higher than the preset temperature range, S1606 to S1607 are executed; if there is no person whose body temperature is higher than the preset temperature range, S1608 is executed.
[0245] S1606: Determine information of a person whose body temperature is higher than a preset temperature range.
[0246] The personnel information may include one or more of the personnel's location information, facial image, body temperature, ID, and attribute information.
[0247] S1607: Output the personnel information corresponding to the facial image whose body temperature is higher than the preset temperature range and a high body temperature alarm.
[0248] Among them, the high body temperature alarm can be used to alert people with abnormal body temperature in the target area.
[0249] S1608. Output personnel information.
[0250] Among them, the personnel information can refer to the above description and will not be repeated here.
[0251] S1609, data statistics.
[0252] Data statistics include attendance data, body temperature detection statistics, and customer flow profile statistics. Attendance data statistics can include employee arrival and departure times. Body temperature detection statistics can include the body temperatures of people within a target area. Customer flow profile statistics can include facial images of people within a target area.
[0253] Based on the technical solution in Figure 16, the server can determine whether there are any abnormal people in the target area based on the facial images and body temperatures obtained. If so, it can output a prompt message. It can also collect information on multiple people in the area to facilitate personnel information management.
[0254] In the embodiment of the present application, the functional modules or functional units of the personnel information determination device can be divided according to the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0255] As shown in FIG17 , it is a schematic structural diagram of a device for determining personnel information provided in an embodiment of the present application. The device includes: an acquisition unit 171 , a processing unit 172 , and a determination unit 173 .
[0256] The acquisition unit 171 is configured to acquire an image frame of the target area and multiple body temperatures, where the image frame includes facial images of multiple people located in the target area.
[0257] The processing unit 172 is configured to: associate the facial images of the multiple persons with the multiple body temperatures according to the position information of the multiple persons, and obtain the body temperature of each person in the target area.
[0258] The determination unit 173 is configured to determine the information of abnormal persons in the target area based on the face, head and body temperature of multiple people in the target area, wherein abnormal persons include persons who are not wearing masks and / or persons whose body temperature exceeds a preset temperature range.
[0259] In some embodiments, processing unit 172 is further configured to recognize the image frame of the target area and obtain a facial recognition result for each of the multiple people. The facial recognition result includes position information of the person's facial image in the image frame. Processing unit 172 is specifically configured to associate the facial images of the multiple people with multiple body temperatures based on the position information of the facial images of the multiple people in the image frame to obtain the body temperature of each person in the target area.
[0260] In some embodiments, the processing unit 172 is specifically configured to associate facial images with the same position information with the body temperatures based on the position information of the facial images of multiple people in the image frame and the position information of the body temperatures in the thermal map of the target area. The thermal map of the target area corresponds to the same viewing angle as the image frame.
[0261] In some embodiments, determination unit 173 is specifically configured to: input a facial image of any of the multiple persons into a mask detection model to determine whether the abnormal person is wearing a mask. The mask detection model is capable of detecting whether a facial image at different posture angles is wearing a mask. If the person is not wearing a mask and the person's body temperature exceeds a preset threshold, the person is determined to be an abnormal person, and the person's identity information is determined based on the facial image of the person.
[0262] In some embodiments, processing unit 172 is further configured to: if the clarity of the person's facial image is below a threshold, perform super-resolution processing on the person's facial image according to a preset super-resolution algorithm to obtain a facial image with a clarity above the threshold. Determination unit 173 is specifically configured to: determine whether the person is an abnormal person based on the facial image with a clarity above the threshold and the body temperature of the person.
[0263] In some embodiments, processing unit 172 is further configured to input the image frame into a face detection model to obtain a face detection frame for each person in the image frame, and input the image frame into a face key point detection model to obtain multiple key points of the face of each person in the image frame. Acquisition unit 171 is further configured to, for each of the multiple persons, acquire the face image of the person from the image frame in the target area based on the face detection frame and multiple key points of the face image, thereby acquiring a face image of each of the multiple persons.
[0264] In some embodiments, the acquisition unit 171 is specifically configured to determine a mapping relationship between multiple key points of the person's face and multiple key points of a preset face template. Based on the mapping relationship, the position information of the face detection frame in the image frame is corrected to obtain a corrected face detection frame, and the image included in the corrected face detection frame is determined as the face image of the person.
[0265] In some embodiments, the acquisition unit is further configured to: acquire a head detection frame in the image frame. The processing unit is further configured to: if the number of head detection frames in the image frame is greater than the number of face detection frames, determine that there is no head detection frame matching the face image among the head detection frames, and delete the human body temperature with the same position information as the head detection frame from the multiple human body temperatures.
[0266] In some embodiments, determining unit 173 is specifically configured to input the facial image of the abnormal person into a facial feature extraction model to obtain a facial feature code of the abnormal person. The facial feature extraction model is capable of extracting facial feature codes of facial images of people wearing masks and people not wearing masks. The identity information of the abnormal person is determined based on the facial feature code of the abnormal person.
[0267] In some embodiments, the determination unit 173 is specifically configured to match the facial feature code of the abnormal person with multiple facial feature codes in a preset facial feature library, where the preset facial feature library includes multiple facial feature codes and identity information corresponding to each facial feature code. If there is a target facial feature code that matches the facial feature code of the abnormal person in the preset facial feature library, the identity information corresponding to the target facial feature code is determined as the identity information of the abnormal person. If there is no facial feature code that matches the facial feature code of the person in the preset facial feature library, the identity information of the abnormal person is set to the preset identity information.
[0268] In some embodiments, the facial recognition results also include attribute information of the person. As shown in FIG17 , the device further includes an output unit 174 configured to output a prompt indicating the presence of an abnormal person in the target area and one or more of the abnormal person's body temperature, identity information, attribute information, and whether or not the abnormal person is wearing a mask.
[0269] When implemented by hardware, the acquisition unit 171 in the embodiment of the present application can be integrated on a communication interface, and the processing unit 172 can be integrated on a processor. The specific implementation is shown in FIG18 .
[0270] Figure 18 shows another possible structural diagram of the device for determining personnel information involved in the above-mentioned embodiments. The communication device includes: a processor 1802 and a communication interface 1803. Processor 1802 is used to control and manage the operation of the device, for example, executing the steps performed by the processing unit 172 and / or performing other processes of the technology described herein. Communication interface 1803 is used to support communication between the device and other network entities, for example, executing the steps performed by the acquisition unit 171. The device may also include a memory 1801 and a bus 1804. Memory 1801 is used to store program code and data of the device.
[0271] Among them, the memory 1801 can be a memory in the device, etc., and the memory can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory can also include a combination of the above types of memory.
[0272] The processor 1802 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processor may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.
[0273] Bus 1804 may be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 1804 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG18 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0274] The device in FIG18 may also be a chip, which includes one or more (including two) processors 1802 and a communication interface 1803 .
[0275] Optionally, the chip further includes a memory 1805, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 1802. A portion of the memory 1805 may also include a non-volatile random access memory (NVRAM).
[0276] In some embodiments, the memory 1805 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.
[0277] In the embodiment of the present application, the corresponding operation is performed by calling the operation instruction stored in the memory 1805 (the operation instruction may be stored in the operating system).
[0278] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer (e.g., a server), the computer executes the method for determining personnel information as described in any of the above embodiments.
[0279] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards, and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks, or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0280] Some embodiments of the present disclosure further provide a computer program product, for example, stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions that, when executed on a computer (e.g., a server), cause the computer to perform the method for determining personnel information as described in the above embodiments.
[0281] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer (eg, a server), the computer program enables the computer to execute the method for determining personnel information as described in the above embodiments.
[0282] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the method for determining personnel information described in some of the above-mentioned embodiments, and will not be repeated here.
[0283] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0284] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0285] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0286] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that a person skilled in the art can conceive within the technical scope disclosed in the present disclosure should be included within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A method for determining personnel information, wherein: The method includes: Acquire an image frame of a target area and multiple human body temperatures, wherein the image frame includes facial images of multiple persons located in the target area; Associating the multiple persons with the multiple body temperatures according to the position information of the multiple persons to obtain the body temperature of each person in the target area; Based on the facial images and body temperatures of multiple persons in the target area, information of abnormal persons in the target area is determined, wherein the abnormal persons include persons who are not wearing masks and / or persons whose body temperatures exceed a preset temperature range.
2. The method according to claim 1, wherein: The method further comprises: Recognize the image frame of the target area to obtain a face recognition result of each of the multiple persons, wherein the face recognition result includes position information of the face image of the person in the image frame; The step of associating the multiple persons with the multiple body temperatures according to the position information of the multiple persons to obtain the body temperature of each of the multiple persons in the target area includes: According to the position information of the facial images of the multiple persons in the image frame, the facial images of the multiple persons are associated with the multiple body temperatures to obtain the body temperature of each of the multiple persons in the target area.
3. The method according to claim 2, characterized in that The associating the facial images of the multiple persons with the multiple body temperatures according to the position information of the facial images of the multiple persons in the image frame comprises: Based on the position information of the facial images of the multiple persons in the image frame and the position information of the multiple body temperatures in the thermal map of the target area, the facial images with the same position information are associated with the body temperatures; wherein the thermal map of the area has the same viewing angle as that corresponding to the image frame.
4. The method according to claim 2, wherein: The determining, based on the facial images and body temperatures of the plurality of persons in the target area, information about abnormal persons in the target area includes: For any one of the multiple persons, inputting the face image of the person into a mask detection model to determine whether the person wears a mask, wherein the mask detection model has a function of detecting whether the face images at different posture angles are wearing a mask; If the person is not wearing a mask and the person's body temperature exceeds a preset threshold, the person is determined as the abnormal person, and the identity information of the abnormal person is determined based on the facial image of the abnormal person.
5. The method according to claim 4, wherein: The method further comprises: If the definition of the facial image of the person is lower than a threshold, super-resolution processing is performed on the facial image of the person according to a preset super-resolution algorithm to obtain a facial image with a definition higher than the threshold; The determining, based on the facial images and body temperatures of the plurality of persons in the target area, information about abnormal persons in the target area includes: Whether the person is an abnormal person is determined based on the facial image of the person whose clarity is higher than the threshold and the body temperature.
6. The method according to claim 4 or 5, wherein: The method further comprises: Input the image frame into a face detection model to obtain a face detection frame for each person in the image frame, and input the image frame into a face key point detection model to obtain a plurality of key points of each person's face; For each of the multiple persons, a facial image of the person is obtained from the image frame of the target area according to a face detection frame of the person and multiple key points of the face, so as to obtain a facial image of each of the multiple persons.
7. The method according to claim 6, wherein: The step of acquiring the face image of the person from the image frame of the target area according to the face detection frame of the person and the multiple key points of the face includes: Determining a mapping relationship between a plurality of key points of the face of the person and a plurality of key points of a preset face template; According to the mapping relationship, the position information of the face detection frame in the image frame is corrected to obtain a corrected face detection frame, and the image included in the corrected face detection frame is determined as the face image of the person.
8. The method according to claim 6, wherein: The method further comprises: Obtaining a head detection frame in the image frame; If the number of head detection frames in the image frame is greater than the number of face detection frames, it is determined that there is no head detection frame with a matching face image among the head detection frames, and the human body temperatures with the same position information as the head detection frame are deleted from the multiple human body temperatures.
9. The method according to any one of claims 4 to 8, wherein: The determining the identity information of the abnormal person according to the facial image of the abnormal person includes: Inputting the facial image of the abnormal person into a facial feature extraction model to obtain the facial feature code of the abnormal person, wherein the facial feature extraction model has the function of extracting facial feature codes of facial images of people wearing masks and facial images of people not wearing masks; The identity information of the abnormal person is determined according to the facial feature coding of the abnormal person.
10. The method according to claim 9, wherein: The step of determining the identity information of the abnormal person according to the facial feature coding of the abnormal person includes: Matching the facial feature code of the abnormal person with multiple facial feature codes in a preset facial feature library; the preset facial feature library includes multiple facial feature codes and identity information corresponding to each facial feature code; If there is a target facial feature code matching the facial feature code of the abnormal person in the preset facial feature library, the identity information corresponding to the target facial feature code is determined as the identity information of the abnormal person; If there is no facial feature code matching the facial feature code of the abnormal person in the preset facial feature library, the identity information of the abnormal person is set to the preset identity information.
11. A device for determining personnel information, wherein: The device comprises an acquisition unit, a processing unit and a determination unit; The acquisition unit is configured to acquire an image frame of a target area and a plurality of human body temperatures, wherein the image frame includes facial images of a plurality of persons located in the target area; The processing unit is configured to associate the facial images of the multiple persons with the multiple body temperatures according to the position information of the multiple persons, so as to obtain the body temperature of each person in the target area; The determination unit is configured to determine information of abnormal persons in the target area based on facial images and body temperatures of multiple persons in the target area, wherein the abnormal persons include persons who are not wearing masks and / or persons whose body temperatures exceed a preset temperature range.
12. A device for determining personnel information, wherein: include: Processor and memory; The memory stores computer instructions, and the processor is used to execute the computer instructions to implement the method for determining personnel information according to any one of claims 1-10.
13. A monitoring system, wherein: The method comprises the determination device according to claim 12, one or more cameras and one or more human body thermometers; the determination device is respectively connected to the one or more cameras and the one or more human body thermometers in communication; different cameras are used to capture image frames of different areas, and each area is provided with a camera and a human body thermometer, and the shooting range of the camera provided in each area is the same as the range collected by the human body thermometer; The human body thermometer is used to collect the human body temperature in the area.
14. The system according to claim 13, wherein: The system also includes a black body; The black body is used to calibrate the measurement accuracy of the human body thermometer.
15. The system according to claim 13 or 14, wherein: The system also includes a display device, which is used to display characteristic information of each person in the area, wherein the characteristic information includes one or more of the person's body temperature, identity information, attribute information, and whether or not the person is wearing a mask.
16. A non-transitory computer-readable storage medium, wherein: The computer-readable storage medium stores instructions. When a computer executes the instructions, the computer executes the method for determining personnel information according to any one of claims 1 to 10.
Citation Information
Patent Citations
Identification verification method and device and electronic equipment
CN111553266A
Self-adaptive portrait temperature matching and mask recognition method and device
CN112131976A
Epidemic prevention monitoring method and system
CN112232186A
Face temperature measurement method and device, computer equipment and storage medium
CN113701894A
Mask wearing detection method, device and equipment and storage medium
CN113947795A
