Method, device, equipment and storage medium for identifying object
By extracting feature information such as the size of the face, it is determined that the face whose size meets the preset conditions is the recognition object, which solves the problem of low accuracy in determining the recognition object caused by multiple faces in the face recognition environment, and achieves a better High recognition accuracy and user experience.
Patent Information
- Application Number
- CN202010983486.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-09-17
AI Technical Summary
In the open environment of face recognition, especially in scenes with large traffic of people, the aggregation of multiple faces leads to poor accuracy in determining the recognition object, prone to misrecognition, and affects the user experience.
By extracting the characteristic information of each face in the preview image, especially the face size value, the appropriate target face is determined as the recognition object according to the preset recognition conditions, thereby improving the accuracy of the recognition object.
During the face collection process, select the appropriate target face to improve the accuracy of identifying the target, reduce misrecognition, and improve user experience.
Smart Images

Figure CN112215084B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a method, device, equipment and storage medium for identifying an object. Background Art
[0002] At present, face recognition is widely used in production, finance, security, transportation and other fields due to its accuracy, security and convenience, such as attendance machines, unmanned retail machines, access control systems, etc.
[0003] However, due to the open environment in which face recognition is used, multiple faces often appear during face collection, especially in queuing scenarios, such as face payment, gate passing, personnel check-in, etc. Therefore, it is easy to cause errors in the identification of objects, and the accuracy of the identification of objects is poor. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for determining an identified object, which can improve the accuracy of determining an identified object.
[0005] In a first aspect, an embodiment of the present application provides a method for determining an identified object, the method comprising:
[0006] Acquire a shooting preview image, wherein the shooting preview image includes at least two faces;
[0007] Extracting feature information of each face of at least two faces in the captured preview image, wherein the feature information includes a face size value;
[0008] According to the face size value of each face, a face whose face size value meets a preset recognition condition is determined as a recognition object.
[0009] In a second aspect, an embodiment of the present application provides a device for determining an identified object, the device comprising:
[0010] An acquisition module, used to acquire a shooting preview image, wherein the shooting preview image includes at least two faces;
[0011] An extraction module, used to extract feature information of each face of at least two faces in the captured preview image, wherein the feature information includes a face size value;
[0012] The determination module is used to determine, based on the face size value of each face, a face whose face size value meets a preset recognition condition as a recognition object.
[0013] In a third aspect, an embodiment of the present application provides an object identification and determination device, the device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the object identification and determination method described in the first aspect or any implementable manner of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method for determining an identification object described in the first aspect or any implementable manner of the first aspect is implemented.
[0015] The embodiment of the present application provides a method, device, equipment and storage medium for determining an identification object, which extracts the face size value of each face in the preview image, and determines the face whose face size value meets the preset identification condition as the identification object according to the face size value of each face. It can select a suitable target face as the identification object during the face collection process, realize the accurate determination of the identification object, and improve the accuracy of the identification object determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a schematic diagram of the architecture of an identification object determination system provided in an embodiment of the present application;
[0018] Figure 2 It is a flowchart of a method for determining an identification object provided in an embodiment of the present application;
[0019] Figure 3 It is a flowchart of another method for determining an identification object provided in an embodiment of the present application;
[0020] Figure 4 This is a schematic diagram of area division provided in an embodiment of the present application;
[0021] Figure 5 It is a relative position schematic diagram provided in an embodiment of the present application;
[0022] Figure 6 is a structural diagram of a device for determining an identification object provided in an embodiment of the present application;
[0023] Figure 7 It is a structural diagram of an identification object determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein only explain the present application, rather than limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0025] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0026] All actions to obtain signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0027] At present, traditional recognition object determination schemes mainly use strategies such as optimizing business processes and adjusting the angle of camera placement to reduce the appearance of multiple faces on the display screen. Generally, the first face that appears on the screen is used as the recognition object in the subsequent business execution process. However, in face recognition scenarios with large traffic, such as face payment, face entry, face gate passing, etc., multiple faces often appear on the display screen. Therefore, misidentification may occur, that is, the faces of "bystanders" or "behind" are used as recognition objects, affecting the user experience.
[0028] Therefore, in order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment and storage medium for determining an identification object. By extracting the face size value of each face in the preview image, according to the face size value of each face, the face whose face size value meets the preset identification condition is determined as the identification object. It is possible to select a suitable target face as the identification object during the face collection process, realize accurate determination of the identification object, and improve the accuracy of the identification object determination.
[0029] The following, in conjunction with the accompanying drawings, describes in detail the identification object determination method, apparatus, device and storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0030] Figure 1 is a schematic diagram of the architecture of an object identification and determination system provided in an embodiment of the present application, such as Figure 1 As shown, the object recognition determination system may include a shooting device 110 and an electronic device 120. The shooting device 110 may be a camera, a device equipped with a camera module, etc. The electronic device 120 may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a teller machine, or a self-service machine, etc. There is a communication connection between the shooting device 110 and the electronic device 120. For example, communication is performed through a network, wherein the network may be a wired communication network or a wireless communication network. Exemplarily, the shooting device 110 may be integrated into the electronic device 120 as a module.
[0031] As an example, the recognition object determination system can be applied to face recognition scenarios such as face payment, face entry, face check-in, etc. In these scenarios, due to the rapid collection of faces and large flow of people, multiple faces tend to gather on the display screen.
[0032] See also Figure 1 , the electronic device 120 can obtain a preview image of the user shot by the shooting device 110, wherein the preview image includes at least two users, that is, at least two faces. Then, feature information of each face in the preview image is extracted, wherein the feature information includes a face size value. Then, according to the face size value of each face, a face whose face size value meets a preset recognition condition is determined as a recognition object, so as to perform subsequent face recognition services.
[0033] The following is an introduction to the identification object determination method provided by the embodiment of the present application. The execution subject of the identification object determination method may be Figure 1 The identification object shown determines the electronic device 120 in the system, or a module in the electronic device 120 .
[0034] Figure 2is a flow chart of a method for determining an identification object provided in an embodiment of the present application, such as Figure 2 As shown, the method for determining an identified object may include the following steps:
[0035] S210, obtaining a shooting preview image.
[0036] The shooting preview image includes at least two faces and can be collected on-site by a shooting device. For example, the shooting preview image can be a preview picture input frame, that is, an image displayed on a display screen when the shooting device is shooting.
[0037] S220, extracting feature information of each of the at least two faces in the captured preview image.
[0038] The feature information includes a face size value. For example, the face size value may include a face-eye distance value or a face pixel number, etc., wherein the face size value is represented by the face-eye distance value, which can reduce the noise of face size differences.
[0039] In one embodiment, a face recognition algorithm may be used to perform preliminary face recognition on the preview image to identify the faces therein, and then feature extraction may be performed on the identified faces to obtain feature information of each face.
[0040] S230, according to the face size value of each face, determine the face whose face size value meets the preset recognition condition as the recognition object.
[0041] Among them, the identified object will be used for face recognition as the subject of subsequent face recognition business execution.
[0042] Compared with other photographed faces, the face used as the recognition object is usually the closest to the shooting device. Therefore, in one embodiment, the face with the largest face size value can be determined as the recognition object, so as to achieve accurate determination of the recognition object.
[0043] In addition, the face of the recognition object should have a size advantage compared to other faces. In another embodiment, the ratio of the face size value of each face except the face with the largest face size value to the maximum face size value among at least two faces can be calculated respectively. When at least one ratio is less than or equal to the first preset ratio threshold, the face corresponding to the maximum face size value is determined as the recognition object, thereby improving the accuracy of the recognition object determination. It can be understood that the first preset ratio threshold can be flexibly set according to the actual situation, for example, it can be 60%.
[0044] It can be seen that the user usually does not leave the current position during the recognition process, and the face always appears on the screen. Therefore, in one example, when at least one ratio is less than or equal to the first preset ratio threshold, the length of time that the face corresponding to the maximum face size value is displayed on the display screen can be obtained. When the display length of the face corresponding to the maximum face size value is greater than or equal to the preset length threshold, the face corresponding to the maximum face size value is determined to be the recognition object. By introducing the display length as a judgment factor based on the face size value, the accurate determination of the recognition object can be further improved.
[0045] As a specific example, the face corresponding to the maximum face size value can be tracked in continuous frames. Exemplarily, a unique face identifier can be assigned to the face corresponding to the maximum face size value. In the face tracking process of continuous frames, if the same face does not leave, the face identifier remains unchanged, so the continuous display time of the face corresponding to the maximum face size value can be counted. Then, when the continuous display time is greater than or equal to T, the face corresponding to the maximum face size value is used as the recognition object. Wherein, T represents a preset time threshold, which can be an absolute time, such as 800ms. It can also be a relative time, such as the time to complete a business processing. For example, in the face-scanning entry scenario, the time it takes to pass through the designated shooting area channel, that is, the time it takes for the user to enter and leave the specific shooting area (without leaving the coverage of the shooting device); another example is the time it takes to collect a certain number of continuous frame images (such as 5); another example is the transaction response time (the time it takes to obtain an identification transaction result), that is, when the face corresponding to the maximum face size value is tracked, the recognition is initiated, and the duration until the response result is received. During this period, the face corresponding to the maximum face size value is always displayed on the display screen.
[0046] In another embodiment, the first position of the face corresponding to the maximum face size value may be obtained. When the first position satisfies the preset position condition, the face corresponding to the maximum face size value is determined as the recognition object, that is, the position is introduced as a judgment factor based on the face size value to improve the accuracy of the recognition object. Among them, the preset position condition may include: the first position matches the preset position, or the first position is located in a preset area. It can be understood that the preset position and the preset area can be flexibly set according to actual conditions, for example, they can be pre-selected according to debugging experience when the scene layout is implemented.
[0047] In the embodiment of the present application, by extracting the face size value of each face in the preview image, based on the face size value of each face, the face whose face size value meets the preset recognition condition is determined as the recognition object. It is possible to select a suitable target face as the recognition object during the face collection process, thereby improving the accuracy of the recognition object determination.
[0048] In one embodiment, when any one of the at least one ratio is greater than a first preset ratio threshold, the method may further include:
[0049] First, when at least one ratio is less than or equal to the second preset ratio threshold, the first position of the face corresponding to the maximum face size value is obtained. Among them, the second preset ratio threshold is greater than the first preset ratio threshold, for example, the first preset ratio threshold is 60%, and the second preset ratio threshold is 80%. Moreover, the first preset ratio threshold and the second preset ratio threshold can be adjusted after a period of time according to the accuracy determined by the recognition object. Exemplarily, a face picture in which the business process is completed, that is, the recognition object is determined correctly, can be selected as a positive sample. A face picture in which the user manually cancels the business process, that is, the recognition object is incorrectly identified, is selected as a negative sample. The accuracy determined by the positive and negative samples in the total samples is statistically analyzed, and the first preset ratio threshold and the second preset ratio threshold are adjusted according to the accuracy to achieve dynamic adjustment of the threshold.
[0050] Then, when the first position meets the preset position condition, the face corresponding to the maximum face size value is determined as the recognition object. In this embodiment, the second preset ratio threshold and position are introduced for further judgment, and the conditions for determining the recognition object are refined, which can further improve the accuracy of determining the recognition object.
[0051] It is understandable that in the face recognition scenario, the user who is the recognition object usually actively approaches the shooting device, and his face is facing the display screen, and generally has the characteristics of being clearly visible, unobstructed, and not closed eyes. In one embodiment, the feature information may also include face angle, face occlusion information, face eye information, etc. Then, at least two faces may be selected based on the face angle, face occlusion information, and face eye information, that is, the face angle, face occlusion information, and face eye information are used as judgment factors to select the faces in the shooting preview image and retain the faces that meet the corresponding conditions.
[0052] Furthermore, at least two faces can be screened according to face size, face angle, face occlusion information, and face eye information. And according to the face size of the screened faces, the face whose face size meets the preset recognition condition is determined as the recognition object. In this example, by screening faces in multiple dimensions and selecting a suitable face from the screened faces as the recognition object, the accuracy of the recognition object determination can be improved.
[0053] The following takes the application of the recognition object determination method to the face payment scenario as an example to describe in detail the recognition object determination method provided in the embodiment of the present application. Figure 3 As shown, the method may include the following steps:
[0054] S301, obtaining a preview image of a user captured on-site by a shooting device.
[0055] S302: Identify a face in the preview image according to a face recognition algorithm.
[0056] S303: Filter the faces in the captured preview image.
[0057] Specifically, feature information of each face may be extracted first, wherein the feature information includes face size, face angle, face occlusion information, and face eye information.
[0058] Secondly, the face size value can be judged for each face, and faces whose face size value is greater than or equal to a preset size threshold are retained. As an example, the face size value is represented by the number of face pixels, and the preset size threshold can be set to 100*100, where 100*100 represents the width and height of face pixels.
[0059] Then, the face angle can be judged, and faces with face angles less than or equal to a preset angle threshold are retained. As an example, face angles include roll angle, pitch angle, and yaw angle. The preset angle thresholds corresponding to the three types of angles can all be ±20°, and faces with all three types of angles less than or equal to ±20° are retained.
[0060] Then, the face occlusion information can be judged, and faces whose face occlusion information meets the face occlusion conditions can be retained. As an example, the face occlusion conditions can be flexibly set according to business requirements, such as no occlusion at all, no occlusion at key points, and the occlusion area does not exceed a certain proportion.
[0061] Furthermore, the eye information of the face can be judged to determine whether the face has closed eyes, and then retain the face with open eyes. It is worth noting that the above judgment steps can be flexibly adjusted according to business needs, such as appropriately increasing or decreasing, changing the order, etc., and there is no limitation here.
[0062] S304: Determine whether the screened face is unique.
[0063] If yes, execute S305; otherwise, execute S308.
[0064] S305: Obtain the duration for which the unique face is displayed on the display screen.
[0065] S306: Determine whether the display time of the unique face is greater than or equal to a preset time threshold.
[0066] If yes, execute S307; otherwise, execute S317.
[0067] S307: Determine a unique face as the recognition object.
[0068] S308. Calculate the ratio of the face size value of each face except the face with the largest face size value to the maximum face size value.
[0069] S309: Determine whether the ratios are all less than or equal to a first preset ratio threshold.
[0070] If yes, execute S310; otherwise, execute S313.
[0071] S310: Obtain the duration for which the face corresponding to the maximum face size value is displayed on the display screen.
[0072] S311. Determine whether the display duration is greater than or equal to a preset duration threshold.
[0073] If yes, execute S312; otherwise, execute S317.
[0074] S312: Determine the face corresponding to the maximum face size value as the recognition object.
[0075] S313: Determine whether the ratios are all less than or equal to a second preset ratio threshold.
[0076] If yes, execute S314; otherwise, execute S317.
[0077] S314: Obtain the first position of the face corresponding to the maximum face size value.
[0078] The first position may include an absolute position of a face corresponding to a maximum face size value, and a relative position with a face corresponding to a second maximum face size value as a reference point.
[0079] Specifically, the preview image can be divided according to a preset area division rule, and the position mark of the face can be determined according to the divided areas, and the position mark can be used to represent the absolute position of the face. Figure 4 , the area division rule can be to divide the preview image according to the center point, and divide it into four quadrants, namely the first quadrant, the second quadrant, the third quadrant, and the fourth quadrant according to the mathematical plane coordinate system. At the same time, the center point is taken as the origin, half of the width of the preview image is taken as the width, and half of the height of the preview image is taken as the height, as the center area C. Among them, the center area C overlaps with the quadrant area.
[0080] As an example, a plane coordinate system can be constructed with the center point as the origin (0, 0). For the face in the preview image, the coordinates (x, y) of the center point of the face are calculated, and the position mark of the face is determined according to the coordinates of the center point of the face and the divided area. The position mark can be LG. Among them, L represents the quadrant in which the coordinates of the center point of the face are located, and the value is 1, 2, 3 or 4. When L is 1, it means that it is located in the first quadrant. G represents whether the coordinates of the center point of the face are located in the central area C, and the value is 0 or 1. When G is 0, it means that it is not located in the central area C, and when G is 1, it means that it is located in the central area C. Among them, the location here includes the center point coordinates on the boundary. Specifically, the position mark can be as follows: not located in the central area C: first quadrant: 10, second quadrant: 20, third quadrant: 30, fourth quadrant: 40; located in the central area C: first quadrant: 11, second quadrant: 21, third quadrant: 31, fourth quadrant: 41. Specifically, taking position mark 10 as an example, it indicates that the coordinates of the center point of the face are located in the first quadrant, not in the central area. Taking position mark 11 as an example, it indicates that the coordinates of the center point of the face are located in the central area and the first quadrant. Figure 4 As shown, the center coordinates of face 1 are located in the third quadrant and not in the central area C, and the position is marked as 30. The center coordinates of face 2 are located in the first and second quadrants and in the central area C, and the positions are marked as 11 and 21. The center coordinates of face 3 are located in the first quadrant and in the central area C, and the position is marked as 11. It can be understood that the area division rules can be flexibly adjusted according to actual needs and are not limited here.
[0081] Among them, the relative position can be calculated using the relative position calculation formula, combined with Figure 5 , the relative position calculation formula can be shown as follows:
[0082] A(X,Y)=O1(x1,y1)-O2(x2,y2) (1)
[0084] A(X, Y) represents a vector, O1(x1, y1) represents the coordinates of the center of the second largest face, and O2(x2, y2) represents the coordinates of the center of the largest face. If X>0, it means that the largest face is on the left side of the second largest face in the horizontal direction, otherwise it is on the right side; if Y>0, it means that the largest face is on the bottom of the second largest face in the vertical direction, otherwise it is on the top.
[0085] S315: Determine whether the first position meets a preset position condition.
[0086] Among them, the preset position condition includes: the first position matches the preset position, or the first position is located in a preset area. In a certain fixed scene, the absolute position and relative position of the recognition object appearing on the display screen often show a certain degree of aggregation. It can be understood that the aggregation position varies due to different scenes or shooting equipment angles. In the scene application, a certain number (for example, 100,000) of face recognition scene images with multiple faces can be selected, data processing can be performed on them, the recognition object and the second largest face can be marked, and the relative position and absolute position of the recognition object can be counted, that is, each image is classified, the absolute position LC value and the relative position A (X, Y) are counted, and according to the statistical results, the LC value or LC value combination with the largest number in the scene, as well as the relative position, are selected to confirm the absolute position and relative position of the recognition object that often appears in the scene, and use this as the preset position, or determine the preset area according to multiple frequently appearing absolute positions and relative positions. By setting the preset position or preset area according to the actual application scene, the accuracy of the recognition object determination can be improved. On this basis, it is judged whether the first position meets the preset position condition. If so, S316 is executed, otherwise, S317 is executed.
[0087] S316: Determine the face corresponding to the maximum face size value as the recognition object.
[0088] S317: It is prompted that the identification object cannot be determined.
[0089] Specifically, a voice prompt like "The identification object cannot be determined, please step back, bystander user" may be issued.
[0090] In another example, S308 may be calculating a first product of the maximum face size value and a first preset ratio threshold, and using the first product as the first size threshold.
[0091] S309 may be to determine whether the face size value of each face except the face with the largest face size value is less than or equal to the first size threshold. If so, execute S310, otherwise, execute S313.
[0092] S313 can be to calculate the second product of the maximum face size value and the second preset ratio threshold, use the second product as the second size threshold, and determine whether the face size value of each face except the face with the largest face size value is less than or equal to the second size threshold. If so, execute S314, otherwise, execute S317.
[0093] Based on the identification object determination method provided in the embodiment of the present application, the embodiment of the present application also provides an identification object determination device, such as Figure 6 As shown, the identification object determination device 600 may include: an acquisition module 610 , an extraction module 620 , and a determination module 630 .
[0094] The acquisition module 610 is used to acquire a shooting preview image, wherein the shooting preview image includes at least two faces.
[0095] The extraction module 620 is used to extract feature information of each of the at least two faces in the captured preview image, wherein the feature information includes a face size value.
[0096] The determination module 630 is used to determine, based on the face size value of each face, a face whose face size value meets a preset recognition condition as a recognition object.
[0097] In one embodiment, the determination module includes: a first determination unit, configured to determine a face with the largest face size value as a recognition object.
[0098] In one embodiment, the determination module includes: a calculation unit, configured to respectively calculate the ratio of the face size value of each human face to the maximum face size value among at least two human faces, except for the human face with the largest face size value.
[0099] The second determining unit is used to determine that the face corresponding to the maximum face size value is the recognition object when at least one ratio is less than or equal to a first preset ratio threshold.
[0100] In one embodiment, the second determination unit includes: an acquisition subunit, which is used to acquire the length of time that the face corresponding to the maximum face size value is displayed on the display screen when at least one ratio is less than or equal to a first preset ratio threshold.
[0101] The determination subunit is used to determine that the face corresponding to the maximum face size value is a recognition object when the display time of the face corresponding to the maximum face size value is greater than or equal to a preset time threshold.
[0102] In one embodiment, the acquisition module is also used to obtain the first position of the face corresponding to the maximum face size value when any one of the at least one ratio is greater than a first preset ratio threshold and at least one ratio is less than or equal to a second preset ratio threshold, wherein the second preset ratio threshold is greater than the first preset ratio threshold.
[0103] The determination module is further used to determine that the face corresponding to the maximum face size value is the recognition object when the first position meets the preset position condition.
[0104] In one embodiment, the determination module includes: an acquisition unit, configured to acquire a first position of a face corresponding to a maximum face size value.
[0105] The third determining unit is configured to determine that a face corresponding to the maximum face size value is a recognition object when the first position meets a preset position condition.
[0106] In one embodiment, the preset position condition includes: the first position matches the preset position, or the first position is located in a preset area.
[0107] In one embodiment, the feature information also includes face angle, face occlusion information, and face eye information.
[0108] The determination module includes: a screening unit, which is used to screen at least two faces according to face angles, face occlusion information, and face eye information.
[0109] The fourth determining unit is used to determine, based on the face size values of the screened faces, a face whose face size value meets a preset recognition condition as a recognition object.
[0110] In one embodiment, the face size value includes a face eye distance value or a face pixel number.
[0111] Understandably, Figure 6 Each module / unit in the illustrated identification object determination device 600 has the function of implementing each step in the identification object determination method provided in the embodiment of the present application and can achieve its corresponding technical effect, which will not be described in detail here for the sake of brevity.
[0112] Figure 7 It is a structural diagram of an identification object determination device provided in an embodiment of the present application.
[0113] like Figure 7 As shown, the identification object determination device 700 in this embodiment includes an input device 701, an input interface 702, a central processing unit 703, a memory 704, an output interface 705, and an output device 706. The input interface 702, the central processing unit 703, the memory 704, and the output interface 705 are connected to each other through a bus 710, and the input device 701 and the output device 706 are connected to the bus 710 through the input interface 702 and the output interface 705, respectively, and then connected to other components of the identification object determination device 700.
[0114] Specifically, the input device 701 receives input information from the outside and transmits the input information to the central processing unit 703 through the input interface 702; the central processing unit 703 processes the input information based on the computer executable instructions stored in the memory 704 to generate output information, temporarily or permanently stores the output information in the memory 704, and then transmits the output information to the output device 706 through the output interface 705; the output device 706 outputs the output information to the outside of the identification object determination device 700 for user use.
[0115] In one embodiment, Figure 7The illustrated identification object determination device 700 includes: a memory 704 for storing programs; and a processor 703 for running the programs stored in the memory to implement the identification object determination method provided in the embodiment of the present application.
[0116] An embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the method for determining an identified object provided in an embodiment of the present application is implemented.
[0117] It should be clear that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. For the sake of brevity, no further description is given. The present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of simplicity, a detailed description of the known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0118] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memories (Read-Only Memory, ROM), flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0119] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0120] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0121] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for determining an identified object, characterized in that: The method comprises: Acquire a shooting preview image, wherein the shooting preview image includes at least two faces; Extracting feature information of each of the at least two faces in the captured preview image, wherein the feature information includes a face size value; According to the face size value of each face, determine the face whose face size value meets the preset recognition condition as the recognition object; The step of determining, based on the face size value of each face, a face whose face size value satisfies a preset recognition condition as a recognition object includes: Calculate the ratio of the face size value of each human face to the maximum face size value among the at least two human faces, except for the human face with the largest face size value; When all calculated ratios are less than or equal to a first preset ratio threshold, determining the face corresponding to the maximum face size value as the recognition object; When any one of all the calculated ratios is greater than a first preset ratio threshold, the method further includes: When all calculated ratios are less than or equal to a second preset ratio threshold, obtaining a first position of the face corresponding to the maximum face size value, wherein the second preset ratio threshold is greater than the first preset ratio threshold; When the first position meets a preset position condition, determining the face corresponding to the maximum face size value as the recognition object; The first position includes the absolute position of the face corresponding to the maximum face size value, and the relative position with the face corresponding to the second largest face size value as a reference point; The preset position conditions include: The first position matches a preset position, or the first position is located in a preset area; The preset position and the preset area are set according to the following process: a preset number of face recognition scene images with multiple faces are selected, data processing is performed on them, the largest face and the second largest face are marked, the relative position and absolute position of the largest face are counted, and based on the statistical results, the largest relative position and absolute position in the scene are selected as the preset position, and the preset area is determined based on multiple frequently occurring absolute positions and relative positions.
2. The method according to claim 1, characterized in that When all the calculated ratios are less than or equal to the first preset ratio threshold, determining the face corresponding to the maximum face size value as the recognition object includes: When all the calculated ratios are less than or equal to the first preset ratio threshold, obtaining the duration for which the face corresponding to the maximum face size value is displayed on the display screen; When the display time of the face corresponding to the maximum face size value is greater than or equal to a preset time threshold, the face corresponding to the maximum face size value is determined to be the recognition object.
3. The method according to claim 1, characterized in that The feature information also includes face angle, face occlusion information, and face eye information; According to the face size value of each face, determining a face whose face size value meets a preset recognition condition as a recognition object includes: Filtering the at least two faces according to the face angle, the face occlusion information, and the face eye information; According to the face size values of the screened faces, faces whose face size values meet preset recognition conditions are determined as recognition objects.
4. The method according to claim 1, characterized in that: The face size value includes a face-eye distance value or a face pixel number.
5. A device for determining an identification object, characterized in that: The device comprises: An acquisition module, used to acquire a shooting preview image, wherein the shooting preview image includes at least two faces; An extraction module, used to extract feature information of each of the at least two faces in the captured preview image, wherein the feature information includes a face size value; A determination module, configured to determine, based on the face size value of each face, a face whose face size value meets a preset recognition condition as a recognition object; Wherein, the determination module includes: a calculation unit, configured to respectively calculate a ratio of a face size value of each human face except the human face with the largest face size value among the at least two human faces to the maximum face size value; A second determining unit, configured to determine that the face corresponding to the maximum face size value is the recognition object when all calculated ratios are less than or equal to a first preset ratio threshold; The acquisition module is further configured to acquire the first position of the face corresponding to the maximum face size value when any one of all the calculated ratios is greater than a first preset ratio threshold and all the calculated ratios are less than or equal to a second preset ratio threshold, wherein the second preset ratio threshold is greater than the first preset ratio threshold; The determination module is further configured to determine, when the first position satisfies a preset position condition, that the face corresponding to the maximum face size value is the recognition object; The first position includes the absolute position of the face corresponding to the maximum face size value, and the relative position with the face corresponding to the second largest face size value as a reference point; The preset position conditions include: The first position matches a preset position, or the first position is located in a preset area; The preset position and the preset area are set according to the following process: a preset number of face recognition scene images with multiple faces are selected, data processing is performed on them, the largest face and the second largest face are marked, the relative position and absolute position of the largest face are counted, and based on the statistical results, the largest relative position and absolute position in the scene are selected as the preset position, and the preset area is determined based on multiple frequently occurring absolute positions and relative positions.
6. The device according to claim 5, characterized in that The second determining unit includes: an acquisition subunit, configured to acquire, when all calculated ratios are less than or equal to a first preset ratio threshold, a duration for which the face corresponding to the maximum face size value is displayed on the display screen; The determination subunit is used to determine that the face corresponding to the maximum face size value is the recognition object when the display time of the face corresponding to the maximum face size value is greater than or equal to a preset time threshold.
7. The device according to claim 5, characterized in that The feature information also includes face angle, face occlusion information, and face eye information; The determination module includes: a screening unit, configured to screen the at least two human faces according to the human face angle, the human face occlusion information, and the human face eye information; The fourth determining unit is used to determine, based on the face size values of the screened faces, a face whose face size value meets a preset recognition condition as a recognition object.
8. The device according to claim 5, characterized in that The face size value includes a face-eye distance value or a face pixel number.
9. A device for identifying an object, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for determining an identified object according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for determining an identified object according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Face verification method, device and equipment and storage medium
CN109948586A
Shooting method and device, terminal equipment and computer readable storage medium
CN110166696A
Photographing Method and Photographing Apparatus for Terminal, and Terminal
US20200177797A1
