Method, device, computer equipment and quality control system for processing face image data
By calculating the proportion of faces of the images to be analyzed in the electronic screen, accurately judge and filter the face images in the electronic screen, the problem of inaccurate filtering in the existing technology is solved and the data analysis efficiency is improved.
Patent Information
- Application Number
- CN202111679874.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The prior art is difficult to accurately filter face images in electronic screens, resulting in excessive interfering data and affecting data analysis efficiency.
By obtaining the set of images to be analyzed and calculating the proportion of faces in each image, a proportion set of the first time period and the second time period is formed. Based on these sets, whether the image is a face image in the electronic screen is determined, and filtering is performed.
It improves the accuracy of filtering face images in electronic screens, reduces interferes with data, and improves the efficiency of data analysis.
Smart Images

Figure CN114495207B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image data processing, and in particular to a method, device, computer equipment and medium for processing face image data. Background Art
[0002] With the development of cloud computing and big data technology, in the field of security, face capture is carried out through a large number of cameras, and then cloud computing and big data analysis are carried out based on the captured images to find out people who may affect public safety and conduct timely warning and intervention, which has become an important way to effectively manage social security. However, some of these cameras are installed in areas where people live frequently, such as elevators, bus stations, street corners, etc., and these places often have some electronic screens for promoting current news and playing advertisements. The face images that appear in the content played on the electronic screen are easily captured by the camera equipment frequently, resulting in a large amount of interference data, affecting the efficiency of data analysis. How to quickly filter the face images captured in the electronic screen has become an urgent problem to be solved.
[0003] In the existing method, there is a method of collecting face images through a capture device, performing face modeling analysis, assigning face identification information, and then storing them in a database for persistent storage. However, due to the limitations of face recognition of the capture device, the back-end modeling and analysis of the front-end captured images is difficult to accurately identify the two-dimensional plane face images, so that the face images on the electronic screen will still be identified as normal pedestrian face images, that is, it is impossible to accurately filter the face images on the electronic screen.
[0004] In the patent application document with publication number CN111639689A, a method, device and computer-readable storage medium for processing face data are disclosed, including: for all face capture data collected by the same collection device within a preset statistical period, the number of face capture data belonging to the same person is determined respectively; from the number of face capture data corresponding to the same collection device, the number of abnormal face capture data is determined; and the face image corresponding to the number of abnormal face capture data is determined as a suspected abnormal face image. Further, the application document compares the number of the same face captured with the total number of captures, and when it exceeds a preset ratio, it is determined to be an abnormal face image. Although the application document can filter the face images in the electronic screen to a certain extent, when there are many face images in the electronic screen, it is easy to miss some face images on the electronic screen, or in some special occasions such as elevators, when there are often elevator service personnel accompanying in and out, it is easy to cause normal living bodies to be identified as face images on the electronic screen, making this method not accurate enough for filtering face images in the electronic screen. Summary of the invention
[0005] The embodiments of the present invention provide a method, an apparatus, a computer device and a storage medium for processing facial image data, so as to improve the filtering accuracy of facial images in an electronic screen.
[0006] In order to solve the above technical problems, the embodiment of the present application provides a method for processing facial image data, including:
[0007] Acquire a set of images to be analyzed, and acquire a capture period of the images to be analyzed in the set of images to be analyzed as a first period;
[0008] Selecting any time period corresponding to the first cycle as a first time period, selecting any time period outside the first cycle as a second time period, and acquiring images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images;
[0009] Calculate the proportion of faces in each of the target images to obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period;
[0010] Based on the first proportion set F and the second proportion set S, it is determined whether the image in the first period is a face image in the electronic screen. If so, the image to be analyzed in the first period is filtered.
[0011] Optionally, the image to be analyzed includes a capture time, and the calculating of the face ratio in each of the target images to obtain a first ratio set F corresponding to the first time period and a second ratio set S corresponding to the second time period includes:
[0012] Calculate the face ratio in each target image;
[0013] The proportion of each target image in the first time period is sorted according to the order of the capture time of the target image, and stored in a set to obtain the first proportion set F;
[0014] The proportion of each target image in the second time period is sorted according to the chronological order of the capture time of the target image, and stored in a set to obtain the second proportion set S.
[0015] Optionally, calculating the face ratio in each target image includes:
[0016] Divide each of the target images into a pixel matrix of N rows and M columns;
[0017] Based on face recognition, identifying the face area in each of the target images and obtaining the pixel range of the face area;
[0018] Based on the pixel range of the face area, the proportion of the face area to the pixel matrix is determined as the face proportion.
[0019] Optionally, judging whether the captured image in the first period is a face image on the electronic screen based on the first proportion set F and the second proportion set S includes:
[0020] Compare the sub-elements in the first proportion set F and the second proportion set S one by one according to their positions;
[0021] If each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S, it is determined that the captured image within the first period is a face image on the electronic screen; otherwise, a similarity calculation is performed on each sub-element in the first proportion set F, and based on the similarity result, it is determined whether the captured image within the first period is a face image on the electronic screen.
[0022] Optionally, before obtaining the set of images to be analyzed and obtaining the capture period of the images to be analyzed in the set of images to be analyzed as the first period, the method for processing facial image data further includes:
[0023] Acquire a captured image set, wherein the captured image set includes a plurality of image information, and the image information includes captured images and captured time points corresponding to the captured images;
[0024] Performing face recognition on each of the captured images in the captured image set, and classifying the captured images containing the same face image in the recognition results into the same candidate set;
[0025] For each candidate set, the captured images in the candidate set are sorted based on the capturing time point, and based on the sorted candidate set, the capturing interval between two captured images with adjacent capturing time points in the candidate set is calculated;
[0026] In the candidate set, if there are two captured images with adjacent captured time points, the captured image with the captured time point arranged later is used as an interference image, and the interference image is deleted from the candidate set to obtain a deleted candidate set;
[0027] Re-determine the capture interval between two captured images with adjacent capture time points in the deleted candidate set to obtain a candidate set after the capture interval is re-determined;
[0028] Based on the candidate set after the snapshot interval is re-determined, the image set to be analyzed is generated. Optionally, based on the first proportion set F and the second proportion set S, it is determined whether the image in the first period is a face image in the electronic screen. If so, after filtering the image to be analyzed in the first period, the method for processing face image data further includes:
[0029] If the image in the first cycle is a face image on an electronic screen, obtaining the device identification of the device that photographed the image to be analyzed as the target device identification;
[0030] The target device identifier is added to the blacklist configuration information.
[0031] In order to solve the above technical problems, the embodiment of the present application further provides a facial image data processing device, including:
[0032] An information acquisition module acquires a set of images to be analyzed, and acquires a capture period of the images to be analyzed in the set of images to be analyzed as a first period;
[0033] an image selection module, configured to select any time period corresponding to the first cycle as a first time period, select any time period outside the first cycle as a second time period, and obtain images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images;
[0034] A proportion calculation module, used to calculate the proportion of faces in each of the target images, and obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period;
[0035] The living body judgment module is used to judge whether the image in the first period is a face image in the electronic screen based on the first proportion set F and the second proportion set S, and if so, filter the image to be analyzed in the first period.
[0036] Optionally, the proportion calculation module includes:
[0037] A face ratio calculation unit, used to calculate the face ratio in each target image;
[0038] a first proportion determination unit, configured to sort the proportion of each target image in the first time period according to the chronological order of the capture time of the target image, and store the sorted proportions in a set to obtain the first proportion set F;
[0039] The second proportion determination unit is used to sort the proportion of each target image in the second time period according to the chronological order of the capture time of the target image, and store them in a set to obtain the second proportion set S.
[0040] Optionally, the face ratio calculation unit includes:
[0041] A matrix division subunit, used for dividing each of the target images into a pixel matrix of N rows and M columns;
[0042] A face region determination subunit, used to identify the face region in each of the target images based on face recognition, and obtain a pixel range of the face region;
[0043] The face ratio determination subunit is used to determine the ratio of the face area to the pixel matrix based on the pixel range of the face area as the face ratio.
[0044] Optionally, the living body determination module includes:
[0045] A comparison unit, configured to compare the sub-elements in the first proportion set F and the second proportion set S one by one according to their positions;
[0046] The result determination unit is used to determine that the captured image within the first period is a face image on the electronic screen if each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S; otherwise, perform similarity calculation on each sub-element in the first proportion set F, and judge whether the captured image within the first period is a face image on the electronic screen based on the similarity result.
[0047] Optionally, the facial image data processing device further includes:
[0048] A set acquisition module, used to acquire a captured image set, wherein the captured image set includes a number of image information, and the image information includes a captured image and a capture time point corresponding to the captured image;
[0049] An image classification module, used for performing face recognition on each of the captured images in the captured image set, and classifying the captured images containing the same face image in the recognition results into the same candidate set;
[0050] A period determination module is used to sort the captured images in the candidate set based on the capture time point for each candidate set, and calculate the capture interval between two captured images with adjacent capture time points in the candidate set based on the sorted candidate set;
[0051] A first processing module is used for, if there are two captured images with adjacent captured time points in the candidate set, the captured image with the later captured time point is used as an interference image, and the interference image is deleted from the candidate set to obtain a candidate set after deletion;
[0052] The second processing module is used to re-determine the capture interval between two captured images with adjacent capture time points in the deleted candidate set to obtain a candidate set after the capture interval is re-determined;
[0053] A module for acquiring a set of images to be analyzed, used to generate the set of images to be analyzed based on the candidate set after the re-determined capture interval. Optionally, the apparatus for processing face image data further includes:
[0054] A device identification acquisition module, used for acquiring the identification of a device that photographed the image to be analyzed as a target device identification if the image in the first period is a face image on an electronic screen;
[0055] The identification list updating module is used to add the target device identification into the blacklist configuration information.
[0056] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above facial image data processing method when executing the computer program.
[0057] In order to solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for processing facial image data are implemented.
[0058] The method, device, computer equipment and storage medium for processing facial image data provided by the embodiment of the present invention obtain a set of images to be analyzed, and obtain the capture period of the images to be analyzed in the set of images to be analyzed as the first period, select any time period corresponding to the first period as the first period, select any time period outside the first period as the second period, and obtain the images to be analyzed in the first time period and the second time period from the set of images to be analyzed as target images, calculate the face ratio in each target image, obtain the first ratio set F corresponding to the first time period and the second ratio set S corresponding to the second time period, and judge whether the image in the first period is a facial image in the electronic screen based on the first ratio set F and the second ratio set S, if so, filter the image to be analyzed in the first period. By distinguishing the difference in the facial ratio between the images in the period and the images outside the period, the rapid recognition of non-living images is realized, and then filtering is performed, which is conducive to improving the filtering accuracy of facial images on the electronic screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0060] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0061] Figure 2 is a flowchart of an embodiment of the method for processing facial image data of the present application;
[0062] Figure 3 is a flowchart of another embodiment of the method for processing facial image data of the present application;
[0063] Figure 4 is a flowchart of another embodiment of the method for processing facial image data of the present application;
[0064] Figure 5 is a flowchart of another embodiment of the method for processing facial image data of the present application;
[0065] Figure 6 is a flowchart of another embodiment of the method for processing facial image data of the present application;
[0066] Figure 7 is a flowchart of another embodiment of the method for processing facial image data of the present application;
[0067] Figure 8is a structural schematic diagram of an embodiment of a device for processing facial image data according to the present application;
[0068] Fig. 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0070] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] See also Figure 1 , Figure 1 This is a schematic diagram of an application scenario of the facial image data processing method. In this scenario, there is at least one camera device, which transmits the captured image to the server through the network. The server recognizes the captured image and filters out the facial image on the electronic screen in order to perform subsequent living image processing, such as security monitoring, group movement prediction, etc.
[0073] The imaging equipment may specifically include but is not limited to: infrared cameras, webcams, micro single-lens cameras, digital cameras, monitoring equipment and edge devices with imaging functions.
[0074] The network can be transmitted through a specific network transmission medium, and the specific network transmission medium can be Bluetooth, wired or wireless, etc.
[0075] Among them, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0076] It should be noted that the method for processing facial image data provided in the embodiment of the present application is executed by a server, and accordingly, the device for processing facial image data is arranged in the server.
[0077] It should be understood that Figure 1 The number of camera devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of camera devices, networks and servers. The camera devices, networks and servers in the embodiment of the present application may specifically correspond to application systems in actual production.
[0078] See also Figure 2 , Figure 2 A method for processing facial image data provided by an embodiment of the present invention is shown. The method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:
[0079] S21: Acquire a set of images to be analyzed, and acquire a capture period of the images to be analyzed in the set of images to be analyzed as a first period.
[0080] Specifically, a set of images to be analyzed is obtained, the set of images to be analyzed includes the images to be analyzed, and a capture period of the images to be analyzed is obtained as the first period.
[0081] The capture period refers to the period during which the same face image appears in the image to be analyzed.
[0082] In one specific embodiment, see Figure 3 , before step S21, that is, before obtaining the set of images to be analyzed and obtaining the capture period of the images to be analyzed in the set of images to be analyzed as the first period, the method for processing face image data further includes:
[0083] S11: Acquire a captured image set, wherein the captured image set includes a number of image information, and the image information includes the captured image and the captured time point corresponding to the captured image;
[0084] S12: performing face recognition on each captured image in the captured image set, and classifying the captured images containing the same face image in the recognition results into the same candidate set;
[0085] S13: for each candidate set, sorting the captured images in the candidate set based on the capturing time point, and calculating the capturing interval between two captured images with adjacent capturing time points in the candidate set based on the sorted candidate set;
[0086] S14: In the candidate set, if there are two captured images with adjacent captured time points and the capture interval between them is less than a preset threshold, the captured image with the later captured time point among the two captured images with adjacent captured time points is used as an interference image, and the interference image is deleted from the candidate set to obtain a deleted candidate set;
[0087] S15: re-determine the capture interval between two captured images with adjacent capture time points in the deleted candidate set, and obtain the candidate set after the capture interval is re-determined;
[0088] S16: Based on the candidate set after the snapshot interval is re-determined, the image set to be analyzed is generated. It should be noted that, because it is an advertisement, continuous snapshots will appear. According to the advertisement duration, the minimum duration of the advertisement is generally 5s (preset threshold), so the continuous snapshots within 5s (preset threshold) can be excluded. The captured image refers to the image transmitted from the camera device.
[0089] Among them, the preset threshold can be set according to real-time needs. Generally, the minimum duration of advertisements on electronic screens is 5 seconds, so those that appear continuously within 5 seconds can be excluded, and only the first snapshot time is retained. Therefore, as a preferred method, the preset threshold can be set to 5 seconds, which can not only maintain the integrity of the data to the greatest extent, but also exclude interference data, reduce the amount of data calculation, and improve data processing efficiency.
[0090] In this embodiment, by processing the captured image set, optimized images to be analyzed and capture cycles are obtained, which reduces the subsequent data processing volume and improves data processing efficiency. At the same time, it is also beneficial to the subsequent data comparison of image data within the capture cycle and image data outside the capture cycle.
[0091] S22: Select any time period corresponding to the first cycle as the first time period, select any time period outside the first cycle as the second time period, and obtain the images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images.
[0092] Specifically, a time period of any cycle is selected from the capture cycle as the first time period, and any time period outside the first cycle is selected as the second time period, and then the images to be analyzed within the first time period and the second time period are obtained from the set of images to be analyzed as target images.
[0093] S23: Calculate the proportion of faces in each target image to obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period.
[0094] Among them, the first proportion set F refers to the set of face proportions in each target image corresponding to the first time period, and the second proportion set S refers to the set of face proportions in each target image corresponding to the second time period.
[0095] Specifically, this embodiment calculates the face ratio in the target image to obtain a first ratio set F corresponding to the first time period and a second ratio set S corresponding to the second time period. The implementation process can refer to the description of subsequent embodiments and will not be repeated here to avoid repetition.
[0096] S24: Based on the first proportion set F and the second proportion set S, determine whether the image in the first period is a face image on the electronic screen, and if so, filter the image to be analyzed in the first period.
[0097] In this embodiment, a set of images to be analyzed is obtained, and the capture period of the images to be analyzed in the set of images to be analyzed is obtained as the first period, and any time period corresponding to the first period is selected as the first period, and any time period outside the first period is selected as the second period, and the images to be analyzed in the first time period and the second time period are obtained from the set of images to be analyzed as target images, and the face ratio in each target image is calculated to obtain a first ratio set F corresponding to the first time period and a second ratio set S corresponding to the second time period. Based on the first ratio set F and the second ratio set S, it is determined whether the images in the first period are face images in the electronic screen. If so, the images to be analyzed in the first period are filtered. By distinguishing the difference in the face ratio between images in the period and images outside the period, rapid recognition of non-living images is achieved, and then filtering is performed, which is conducive to improving the filtering accuracy of face images on the electronic screen.
[0098] See also Figure 4 In another optional implementation, in step 23, the image to be analyzed includes the capture time, and the face ratio in each target image is calculated to obtain a first ratio set F corresponding to the first time period and a second ratio set S corresponding to the second time period, including:
[0099] S231: Calculate the face ratio in each target image;
[0100] S232: sorting the proportion of each target image in the first time period according to the order of the capture time of the target image, and storing them in a set to obtain a first proportion set F;
[0101] S232: sort the proportion of each target image in the second time period according to the order of the capture time of the target image, and store them in a set to obtain a second proportion set S.
[0102] Specifically, by identifying the faces in each target image and then determining the proportion of the faces in the target image, the face ratio in each target image is obtained, and then summarized according to the time period described in the target image to obtain the first ratio set F and the first ratio set F.
[0103] It should be noted that the face proportion in each target image is a value of 0-1, for example 0.26, and the first proportion set F and the second proportion set S are in the form of arrays. For example, the first proportion set F is {0.26, 0.28, 0.23, 0.3, 0.19}, and the second proportion set S is {0.3, 0.36, 0.37, 0.33, 0.35}.
[0104] In this embodiment, the first proportion set F and the second proportion set S are determined by calculating the proportion of each target image in the first time period and the second time period, which is beneficial for subsequent quick judgment based on the first proportion set F and the second proportion set S whether the captured image in the first time period is a face image on the electronic screen.
[0105] See also Figure 5 In a specific optional implementation, in step S231, calculating the face ratio in each target image includes:
[0106] S2311: Divide each target image into a pixel matrix of N rows and M columns;
[0107] S2312: Based on the face recognition method, identify the face area in each target image and obtain the pixel range of the face area;
[0108] S2313: Based on the pixel range of the face area, determine the ratio of the face area to the pixel matrix as the face ratio.
[0109] Wherein, N and M are integers greater than 1, and the specific values can be set according to the actual situation and are not limited here.
[0110] Among them, face recognition refers to performing face recognition on a target image to obtain the face area in the target image. The specific methods used include but are not limited to recognition algorithms based on facial feature points (Feature-based recognition algorithms), recognition algorithms based on the entire face image (Appearance-based recognition algorithms), template-based recognition algorithms (Template-based recognition algorithms) and recognition algorithms using neural networks (Recognition algorithms using neural network), etc.
[0111] In this embodiment, by dividing the target image into a pixel matrix of N rows and M columns, and then calculating the proportion of the pixel matrix occupied by the face area, the huge amount of calculation caused by using full pixels for calculation is avoided, the data processing efficiency is improved, and it is beneficial to improve the calculation speed.
[0112] See also Figure 6 In another optional implementation, in step S24, based on the first proportion set F and the second proportion set S, determining whether the captured image in the first period is a face image on the electronic screen includes:
[0113] S241: Compare the sub-elements in the first proportion set F and the second proportion set S one by one according to their positions.
[0114] Specifically, the sub-elements in the first proportion set F and the second proportion set S are compared one by one in turn to obtain a comparison result.
[0115] For example, in a specific implementation, the first proportion set F is {0.26, 0.28, 0.23, 0.3, 0.19}, and the second proportion set S is {0.3, 0.36, 0.37, 0.33, 0.35}. The first element 0.26 of the first proportion set F is compared with the first element 0.3 of the second proportion set S, and then the second element 0.28 of the first proportion set F is compared with the first element 0.36 of the second proportion set S, and the third element, the fourth element and the fifth element are compared in turn to obtain the final comparison result.
[0116] S242: If each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S, it is determined that the captured image in the first period is a face image in the electronic screen; otherwise, a similarity calculation is performed on each sub-element in the first proportion set F, and based on the similarity result, it is determined whether the captured image in the first period is a face image in the electronic screen.
[0117] It should be noted that electronic screen advertisements are usually set up in fixed places such as elevators, and the proportion of human head portraits in electronic screens is much smaller than that of live head portraits. Based on this, the first proportion set F and the second proportion set S are compared. According to the comparison results, if each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S, it is determined to be a face image in the electronic screen. If not, it needs to be further judged based on the similarity.
[0118] It is easy to understand that when the similarity is the same, or greater than a preset similarity threshold (the preset similarity threshold can be set according to actual needs), it can be determined to be a face image on the electronic screen.
[0119] See also Figure 7 In another optional implementation, after step S204, the method for processing facial image data further includes:
[0120] S251: If the image in the first cycle is a face image on the electronic screen, obtaining the device identification of the device that photographed the image to be analyzed as the target device identification;
[0121] S252: Add the target device identifier to the blacklist configuration information.
[0122] Specifically, different camera devices are distributed in elevator cars, supermarkets, office buildings, public transportation, residential buildings and other places. For the convenience of management, this embodiment identifies the device of each camera device that transmits image data to the server and stores it in the configuration file. When it is detected that the image in the first cycle is a face image on the electronic screen, it is determined that the camera device will capture the advertising information on the electronic screen, so that the face contained therein is processed as a normal face image, and the device identification corresponding to the camera device is used as the target device identification, and the target device identification is added to the blacklist configuration information.
[0123] The specific updating method may be to add the target device identifier to a blacklist, or to filter the captured images transmitted in a preset period in the target device identifier. The specific updating method may be selected according to actual needs and is not limited here.
[0124] In this embodiment, when the image in the first cycle is a face image on the electronic screen, the device identification of the device that took the image to be analyzed is obtained as the target device identification, and the device identification list of the configuration file is updated based on the target device identification, which is beneficial to improving the subsequent filtering efficiency of the face data on the electronic screen.
[0125] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0126] Figure 8 The principle block diagram of the face image data processing device corresponding to the face image data processing method of the above embodiment is shown. Figure 8 As shown, the facial image data processing device includes an information acquisition module 31, an image selection module 32, a ratio calculation module 33 and a live body judgment module 34. The detailed description of each functional module is as follows:
[0127] The information acquisition module 31 acquires a set of images to be analyzed, and acquires a capture period of the images to be analyzed in the set of images to be analyzed as a first period;
[0128] The image selection module 32 is used to select any time period corresponding to the first cycle as the first time period, select any time period outside the first cycle as the second time period, and obtain the images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images;
[0129] A proportion calculation module 33 is used to calculate the proportion of faces in each target image to obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period;
[0130] The living body judgment module 34 is used to judge whether the image in the first period is a face image in the electronic screen based on the first proportion set F and the second proportion set S, and if so, filter the image to be analyzed in the first period.
[0131] Optionally, the proportion calculation module 33 includes:
[0132] A face ratio calculation unit, used to calculate the face ratio in each target image;
[0133] A first proportion determination unit is used to sort the proportion of each target image in the first time period according to the order of the capture time of the target image, and store them in a set to obtain a first proportion set F;
[0134] The second proportion determination unit is used to sort the proportion of each target image in the second time period according to the chronological order of the capture time of the target image, and store them in a set to obtain a second proportion set S.
[0135] Optionally, the face ratio calculation unit includes:
[0136] A matrix division subunit, used for dividing each target image into a pixel matrix of N rows and M columns;
[0137] A face region determination subunit is used to identify the face region in each target image based on face recognition and obtain the pixel range of the face region;
[0138] The face ratio determination subunit is used to determine the ratio of the face area to the pixel matrix based on the pixel range of the face area as the face ratio.
[0139] Optionally, the living body determination module 34 includes:
[0140] A comparison unit, used for comparing the sub-elements in the first proportion set F and the second proportion set S one by one according to their positions;
[0141] The result determination unit is used to determine that the captured image in the first period is a face image in the electronic screen if each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S; otherwise, perform similarity calculation on each sub-element in the first proportion set F, and judge whether the captured image in the first period is a face image in the electronic screen based on the similarity result.
[0142] Optionally, the facial image data processing device further includes:
[0143] A collection acquisition module is used to acquire a collection of captured images, wherein the collection of captured images includes a number of image information, and the image information includes the captured images and the capture time points corresponding to the captured images;
[0144] An image classification module is used to perform face recognition on each captured image in the captured image set, and classify the captured images containing the same face image in the recognition results into the same candidate set;
[0145] The cycle determination module is used to sort the captured images in each candidate set based on the capturing time point, and calculate the capturing interval between two captured images with adjacent capturing time points in the candidate set based on the sorted candidate set;
[0146] A first processing module is used for, if there are two captured images with adjacent captured time points in the candidate set with a capture interval less than a preset threshold, taking the captured image with the later captured time point in the two captured images with adjacent captured time points as an interference image, deleting the interference image from the candidate set, and obtaining a deleted candidate set;
[0147] The second processing module is used to re-determine the capture interval between two captured images with adjacent capture time points in the deleted candidate set, and obtain the candidate set after the capture interval is re-determined;
[0148] The module for determining the image set to be analyzed is used to generate the image set to be analyzed based on the candidate set after the capture interval is re-determined.
[0149] Optionally, the facial image data processing device further includes:
[0150] A device identification acquisition module, used for acquiring the identification of a device that photographed the image to be analyzed as a target device identification if the image in the first cycle is a face image on an electronic screen;
[0151] The identification list updating module is used to update the device identification list of the configuration file based on the target device identification.
[0152] The specific definition of the facial image data processing device can refer to the definition of the facial image data processing method above, which will not be repeated here. Each module in the above facial image data processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0153] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 9 This is a basic structural block diagram of the computer device in this embodiment.
[0154] The computer device 9 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0155] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0156] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code for processing face image data, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0157] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as the program code for processing face image data.
[0158] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0159] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor so that the at least one processor performs the steps of the facial image data processing method as described above.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0161] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for processing facial image data, characterized in that: include: Acquire a set of images to be analyzed, and acquire a capture period of the images to be analyzed in the set of images to be analyzed as a first period; Selecting any time period corresponding to the first cycle as a first time period, selecting any time period outside the first cycle as a second time period, and acquiring images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images; Calculate the proportion of faces in each of the target images to obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period; Based on the first proportion set and the second proportion set, it is determined whether the image in the first period is a face image in the electronic screen. If so, the image to be analyzed in the first period is filtered.
2. The method for processing facial image data according to claim 1, characterized in that: The image to be analyzed includes a capture time, and the calculation of the face ratio in each of the target images to obtain a first ratio set F corresponding to the first time period and a second ratio set S corresponding to the second time period includes: Calculate the face ratio in each target image; The proportion of each target image in the first time period is sorted according to the order of the capture time of the target image, and stored in a set to obtain the first proportion set F; The proportion of each target image in the second time period is sorted according to the chronological order of the capture time of the target image, and stored in a set to obtain the second proportion set S.
3. The method for processing facial image data according to claim 2, characterized in that: The calculating the face ratio in each target image includes: Divide each of the target images into a pixel matrix of N rows and M columns; Based on face recognition, identifying the face area in each of the target images and obtaining the pixel range of the face area; Based on the pixel range of the face area, the proportion of the face area to the pixel matrix is determined as the face proportion.
4. The method for processing facial image data according to any one of claims 1 to 3, characterized in that: The determining, based on the first proportion set F and the second proportion set S, whether the captured image within the first period is a face image on the electronic screen includes: Compare the sub-elements in the first proportion set F and the second proportion set S one by one according to their positions; If each sub-element of the first proportion set F is smaller than the sub-element at the corresponding position in the second proportion set S, it is determined that the captured image within the first period is a face image on the electronic screen; otherwise, a similarity calculation is performed on each sub-element in the first proportion set F, and based on the similarity result, it is determined whether the captured image within the first period is a face image on the electronic screen.
5. The method for processing facial image data according to claim 1, characterized in that: Before obtaining the set of images to be analyzed and obtaining the capture period of the images to be analyzed in the set of images to be analyzed as the first period, the method for processing face image data further includes: Acquire a captured image set, wherein the captured image set includes a plurality of image information, and the image information includes captured images and captured time points corresponding to the captured images; Performing face recognition on each of the captured images in the captured image set, and classifying the captured images containing the same face image in the recognition results into the same candidate set; For each candidate set, the captured images in the candidate set are sorted based on the capturing time point, and based on the sorted candidate set, the capturing interval between two captured images with adjacent capturing time points in the candidate set is calculated; In the candidate set, if there are two captured images with adjacent captured time points, the captured image with the captured time point arranged later is used as an interference image, and the interference image is deleted from the candidate set to obtain a deleted candidate set; Re-determine the capture interval between two captured images with adjacent capture time points in the deleted candidate set to obtain a candidate set after the capture interval is re-determined; The set of images to be analyzed is generated based on the candidate set after the re-determined capture interval.
6. The method for processing facial image data according to claim 1, characterized in that: In the step of determining whether the image in the first period is a face image in the electronic screen based on the first proportion set F and the second proportion set S, and if so, filtering the image to be analyzed in the first period, the method for processing face image data further includes: If the image in the first cycle is a face image on an electronic screen, obtaining the device identification of the device that photographed the image to be analyzed as the target device identification; The target device identifier is added to the blacklist configuration information.
7. A facial image data processing device, characterized in that: include: An information acquisition module acquires a set of images to be analyzed, and acquires a capture period of the images to be analyzed in the set of images to be analyzed as a first period; an image selection module, configured to select any time period corresponding to the first cycle as a first time period, select any time period outside the first cycle as a second time period, and obtain images to be analyzed within the first time period and the second time period from the set of images to be analyzed as target images; A proportion calculation module, used to calculate the proportion of faces in each of the target images, and obtain a first proportion set F corresponding to the first time period and a second proportion set S corresponding to the second time period; The living body judgment module is used to judge whether the image in the first period is a face image in the electronic screen based on the first proportion set F and the second proportion set S, and if so, filter the image to be analyzed in the first period.
8. The facial image data processing device according to claim 7, characterized in that: The proportion calculation module includes: A face ratio calculation unit, used to calculate the face ratio in each target image; a first proportion determination unit, configured to sort the proportion of each target image in the first time period according to the chronological order of the capture time of the target image, and store the sorted proportions in a set to obtain the first proportion set F; The second proportion determination unit is used to sort the proportion of each target image in the second time period according to the chronological order of the capture time of the target image, and store them in a set to obtain the second proportion set S.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for processing facial image data according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for processing facial image data as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Technology for applying figure and head portrait comparison to videos
CN104091176A
Face data processing method and device, and computer readable storage medium
CN111639689A