Biometric feature recognition method and apparatus, computer device, and storage medium
Patent Information
- Application Number
- PCT/CN2024/121294
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-07
- Filing Date
- 2024-09-26
- Publication Date
- 2025-10-02
AI Technical Summary
In existing biometric recognition technology, the problem of insufficient image brightness leads to low recognition accuracy and success rate.
By adjusting the exposure parameters and capturing the second image to ensure that the brightness is within the reference brightness range, the clarity of the biometric feature is improved, ultimately leading to accurate biometric recognition.
The accuracy and success rate of biometric recognition are improved, and recognition errors or failures caused by unclear images are avoided.
Smart Images

Figure CN2024121294_02102025_PF_FP_ABST
Abstract
Description
Biometric identification method, device, computer equipment and storage medium
[0001] This application claims priority to Chinese patent application number 202410263657.0, filed on March 7, 2024, entitled “Biometric Identification Method, Device, Computer Equipment and Storage Medium,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a biometric recognition method, apparatus, computer device, and storage medium. Background Art
[0003] With the development of computer technology, biometric recognition technology is becoming increasingly widely used. It can be applied in a variety of scenarios, such as payment and card processing, to verify user identities. Currently, the biometric recognition process involves capturing an image containing biometric features and then performing biometric recognition on the image to identify the object to which the biometric features belong.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a biometric identification method, apparatus, computer device, and storage medium that can improve the accuracy and success rate of biometric identification. The technical solution is as follows:
[0006] In one aspect, a biometric feature recognition method is provided, the method being executed by a computer device, the method comprising:
[0007] determining a first recognition range from a first image, where the image within the first recognition range includes a biometric feature, and the first image is acquired based on a first exposure parameter;
[0008] If the brightness of the image within the first recognition range does not fall within the reference brightness range, adjusting the first exposure parameter to obtain a second exposure parameter;
[0009] capturing a second image based on the second exposure parameter, wherein the second image includes the biometric feature;
[0010] determining a second recognition range from the second image, where the image within the second recognition range contains the biometric feature;
[0011] When the brightness of the image within the second recognition range falls within the reference brightness range, the object to which the biometric feature contained in the image within the second recognition range belongs is recognized.
[0012] In another aspect, a biometric feature recognition device is provided, comprising:
[0013] A determination module, configured to determine a first recognition range from a first image, where the image within the first recognition range contains a biometric feature, and the first image is acquired based on a first exposure parameter;
[0014] An adjusting module, configured to adjust the first exposure parameter to obtain a second exposure parameter when the brightness of the image within the first recognition range does not fall within a reference brightness range;
[0015] an acquisition module, configured to acquire a second image based on the second exposure parameter, wherein the second image includes the biometric feature;
[0016] The determining module is further configured to determine a second recognition range from the second image, wherein the image within the second recognition range contains the biometric feature;
[0017] The recognition module is configured to recognize the object to which the biometric feature contained in the image within the second recognition range belongs when the brightness of the image within the second recognition range falls within the reference brightness range.
[0018] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the computer device implements the operations performed by the biometric recognition method described in the above aspects.
[0019] On the other hand, a non-volatile computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to enable the computer to implement the operations performed by the biometric recognition method described in the above aspects.
[0020] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is executed by a processor to enable a computer to implement the operations performed by the biometric recognition method as described in the above aspects.
[0021] In the solution provided in the embodiments of the present application, during the biometric feature recognition process, a first recognition range is determined from a captured first image to determine the location of the biometric feature in the first image. The brightness of the image within the first recognition range is detected to determine whether the biometric feature in the first image is sufficiently clear. If the brightness of the image within the first recognition range does not fall within a reference brightness range, it is determined that the biometric feature in the first image is not clear enough. Then, the exposure parameters are adjusted so that the next image (i.e., the second image) is captured using the adjusted exposure parameters to improve the clarity of the biometric feature in the next captured image. If the brightness of the image within the second recognition range (i.e., the image containing the biometric feature) on the second image falls within the reference brightness range, it indicates that the biometric feature in the second image is sufficiently clear. At this time, biometric feature recognition is performed on the image within the second recognition range to identify the biometric feature of the object. This can avoid recognition errors or recognition failures due to unclear biometric features in the image, thereby improving the accuracy and success rate of biometric feature recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is a schematic diagram of a structure of an implementation environment provided by an embodiment of the present application;
[0023] FIG2 is a flow chart of a biometric identification method provided in an embodiment of the present application;
[0024] FIG3 is a flow chart of another biometric identification method provided in an embodiment of the present application;
[0025] FIG4 is a schematic structural diagram of a camera collector provided in an embodiment of the present application;
[0026] FIG5 is a schematic diagram of the structure of a target detection model provided in an embodiment of the present application;
[0027] FIG6 is a flow chart of another biometric identification method provided in an embodiment of the present application;
[0028] FIG7 is a flow chart of determining a second identification range according to an embodiment of the present application;
[0029] FIG8 is a flowchart of training a target detection model provided by an embodiment of the present application;
[0030] FIG9 is a schematic diagram of a sample image provided in an embodiment of the present application;
[0031] FIG10 is a flow chart of a model packaging method provided by an embodiment of the present application;
[0032] FIG11 is a flow chart of another biometric identification method provided in an embodiment of the present application;
[0033] FIG12 is a schematic diagram of the weight of a first image provided in an embodiment of the present application;
[0034] FIG13 is a flow chart of another biometric identification method provided in an embodiment of the present application;
[0035] FIG14 is a flow chart of another biometric identification method provided in an embodiment of the present application;
[0036] FIG15 is a schematic structural diagram of a biometric identification device provided in an embodiment of the present application;
[0037] FIG16 is a schematic structural diagram of another biometric feature recognition device provided in an embodiment of the present application;
[0038] FIG17 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
[0039] FIG18 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0041] As used herein, the terms "first," "second," "third," "fourth," and the like may be used to describe various concepts herein, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, a first feature can be referred to as a second feature, and similarly, a second feature can be referred to as a first feature without departing from the scope of this application.
[0042] As used herein, the terms "at least one," "a plurality," "each," and "any" include one, two, or more than two, "a plurality" includes two or more than two, "each" refers to each of the corresponding plurality, and "any" refers to any one of the plurality. For example, a plurality of pixels includes three pixels, and "each" refers to each of the three pixels. "Any" refers to any one of the three pixels, which may be the first pixel, the second pixel, or the third pixel.
[0043] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, and display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the images involved in this application were obtained with full authorization.
[0044] The biometric feature recognition method provided in the embodiments of the present application can be executed by a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, smart voice interaction device, smart home appliance and car terminal, etc., but is not limited to this.
[0045] In some embodiments, the computer program involved in the embodiments of the present application can be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network can constitute a blockchain system.
[0046] In some embodiments, the computer device is provided as a server. FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to FIG1 , the implementation environment includes a terminal 101 and a server 102, and the terminal 101 and the server 102 are connected via a wireless or wired network.
[0047] The terminal 101 is used to capture images and send the captured images to the server 102 via a network connection with the server 102. The server 102 is used to receive the images sent by the terminal 101 and process the images to identify biometric features contained in the images.
[0048] In some embodiments, terminal 101 is installed with an application provided by server 102, and terminal 101 can use this application to implement functions such as data transmission and message exchange. Optionally, the application is an application in the operating system of terminal 101, or an application provided by a third party. For example, the application is any application that has a biometric feature recognition function. Of course, the application can also have other functions, such as review functions, shopping functions, navigation functions, game functions, etc.
[0049] The terminal 101 is used to log in to the application based on the account, and send the collected image to the server 102 through the application. The server 102 is used to receive the image sent by the terminal 101 and process the image to identify the biometric features in the image.
[0050] FIG2 is a flow chart of a biometric feature recognition method provided in an embodiment of the present application. The method is executed by a computer device. As shown in FIG2 , the method includes the following steps 201 to 205:
[0051] 201. A computer device determines a first recognition range from a first image, where the image within the first recognition range contains a biometric feature and the first image is acquired based on a first exposure parameter.
[0052] In an embodiment of the present application, in response to a biometric recognition instruction, an image containing a biometric feature is captured so that the image containing the biometric feature can be subsequently recognized. Considering that content other than the biometric feature in the image may affect the accuracy of biometric recognition, and the brightness of the partial image containing the biometric feature may affect the clarity of the biometric feature, thereby also affecting the accuracy of biometric recognition, a first recognition range is determined from the captured image to determine the location of the biometric feature in the first image. The brightness of the image within the first recognition range is detected to determine whether it falls within a reference brightness range to determine whether the partial image containing the biometric feature is sufficiently clear. If the partial image containing the biometric feature is not clear enough, the exposure parameters are adjusted so that the next image is captured using the adjusted exposure parameters to make the partial image containing the biometric feature in the next captured image clearer. Only when the partial image containing the biometric feature is clear enough will biometric recognition be performed on the partial image containing the biometric feature to identify the object to which the biometric feature belongs, thereby ensuring the accuracy and success rate of biometric recognition.
[0053] Biometrics refer to the basic attributes or characteristics of a living being, and different living beings may have different biometrics. The embodiments of this application do not limit the types of biometrics. For example, the types of biometrics may include but are not limited to fingerprint features, iris features, facial features, palm print features, etc.
[0054] The biometric feature may be at any position in the first image, for example, the biometric feature is at the upper left corner of the first image, or at the upper right corner of the first image. The first recognition range is the range where the biometric feature identified from the first image is located, and the image within the first recognition range contains the complete biometric feature. The first recognition range can be a range of any shape, for example, the first recognition range is a circular range or a square range. In an embodiment of the present application, determining the first recognition range from the first image refers to determining the position of the first recognition range in the first image, for example, the position can be expressed by coordinates, that is, determining the position of the biometric feature from the first image. Exposure parameters are used to capture images, and the exposure parameters include aperture, shutter speed or sensitivity, etc. The first exposure parameters refer to the exposure parameters used when capturing the first image.
[0055] Exemplarily, the computer device captures an image of the captured area using an image capture device configured with first exposure parameters to obtain a first image. The image capture device can be any device with image capture capabilities. In some embodiments, the image capture device can also be referred to as a camera collector, an image sensor, etc.
[0056] Exemplarily, the computer device captures a first image in response to a biometric recognition instruction. The embodiments of the present application do not limit the manner in which the computer device obtains the biometric recognition instruction. Exemplarily, the computer device includes a biometric recognition control, and the computer device obtains the biometric recognition instruction in response to a triggering operation of the biometric recognition control. Exemplarily, the computer device obtains the biometric recognition instruction in response to detecting that a biometric feature is in a shooting area. Exemplarily, the computer device obtains the biometric recognition instruction in response to detecting an execution request for a target operation, where the execution request for the target operation is used to request execution of the target operation, where the target operation refers to an operation that needs to be executed based on the biometric recognition result.
[0057] The embodiments of this application do not limit the type of computer device, and may be related to a specific biometric recognition scenario. For example, if the biometric recognition scenario is a clock-in scenario, the computer device may refer to a clock-in device; if the biometric recognition scenario is a payment scenario, the computer device may refer to a payment device, a scanning device, etc.
[0058] 202. When the brightness of the image within the first recognition range does not fall within the reference brightness range, the computer device adjusts the first exposure parameter to obtain a second exposure parameter.
[0059] In the embodiment of the present application, the reference brightness range is an arbitrary brightness range. If the brightness of the image within the first recognition range falls within the reference brightness range, it indicates that the partial image containing the biometric feature is sufficiently clear. If the brightness of the image within the first recognition range does not fall within the reference brightness range, it indicates that the partial image containing the biometric feature is not clear enough. Furthermore, considering that the exposure parameters will affect the brightness of the captured image, that is, whether the image is clear is related to the exposure parameters used when capturing the image, when the first recognition range is determined from the first image, it is detected whether the brightness of the image within the first recognition range falls within the reference brightness range. If the brightness of the image within the first recognition range does not fall within the reference brightness range, it is determined that the partial image containing the biometric feature is not clear enough. Then, the first exposure parameters used to capture the first image are adjusted to obtain new exposure parameters so that the next image can be captured using the new exposure parameters, thereby improving the clarity of the partial image containing the biometric feature in the next captured image.
[0060] In an exemplary embodiment, the reference brightness range can be determined by: obtaining historical images that have undergone biometric identification and the identification results of the historical images, where the identification results of the historical images include identification success and identification failure, where identification success is used to indicate that the process of performing biometric identification on the historical images is successful, and identification failure is used to indicate that the process of performing biometric identification on the historical images is unsuccessful; determining a candidate image in the historical images whose identification result is a successful identification, and using the brightness range of the candidate image as the reference brightness range.
[0061] The image within the first recognition range is equivalent to the partial image of the first image that contains the biometric feature. The second exposure parameter is different from the first exposure parameter, for example, one or more of the aperture, shutter speed, or sensitivity of the first exposure parameter and the second exposure parameter are different.
[0062] 203. The computer device captures a second image based on the second exposure parameter, where the second image includes a biometric feature.
[0063] In the embodiment of the present application, when the second exposure parameter is obtained, an image is captured using the second exposure parameter to obtain a second image, so that the second image can be used to perform biometric feature recognition later.
[0064] 204. The computer device determines a second identification range from the second image, where the image within the second identification range contains biometric features.
[0065] Exemplarily, the process of a computer device determining a second recognition range from a second image includes: determining a third recognition range from the second image based on the position of the first recognition range in the first image, the position of the third recognition range in the second image being the same as the position of the first recognition range in the first image; and adjusting the position of the third recognition range in the second image to obtain a second recognition range.
[0066] In an embodiment of the present application, the first image and the second image are captured in response to a biometric recognition instruction, and the second image is an image captured after the first image. Relative to the first image, the position of the biometric feature in the second image may change, but considering that the time interval between capturing the first image and capturing the second image is short, the position of the biometric feature in the second image does not change much compared to the position of the biometric feature in the first image. Therefore, the position of the first recognition range in the first image is used to determine the third recognition range from the second image, so that the second recognition range can be determined from the second image as soon as possible using the third recognition range, so that the image within the second recognition range contains the biometric feature.
[0067] The third recognition range has the same shape as the first recognition range, and is equivalent to the area obtained by mapping the first recognition range to the second image. For example, the first image and the second image have the same size, the third recognition range has the same size as the first recognition range, and the position of the third recognition range in the second image is the same as the position of the first recognition range in the first image. Exemplarily, the position of the first recognition range in the first image can be represented by the coordinates of the first recognition range in the first image. For example, if the first recognition range is a rectangular range or a square range, the position of the first recognition range in the first image can be represented by the coordinates of the four corners of the rectangular range or the square range.
[0068] The position of the first identification range in the first image can also be represented by other types of information. For example, if the first identification range is a circular range, the position of the first identification range in the first image can be represented by the center coordinates of the circular range and the radius of the circular range; for another example, if the first identification range is a square range, the position of the first identification range in the first image can be represented by the center coordinates of the square range and the side length of the square range; for another example, if the first identification range is a rectangular range, the position of the first identification range in the first image can be represented by the upper left corner coordinates of the rectangular range and the length and width of the rectangular range.
[0069] In the embodiment of the present application, since the third recognition range is determined based on the first recognition range in the first image, and considering that the position of the biometric feature may change when the first and second images are captured, thereby causing the position of the biometric feature in the first and second images to be different, the position of the third recognition range in the second image is adjusted. The adjusted recognition range is the second recognition range determined from the second image, so that the image within the second recognition range contains the biometric feature, thereby ensuring the accuracy of the obtained second recognition range. In the embodiment of the present application, determining the second recognition range from the second image means determining the position of the second recognition range in the second image, that is, determining the position of the biometric feature from the second image.
[0070] 205. When the brightness of the image within the second recognition range falls within the reference brightness range, the computer device identifies the object to which the biometric feature contained in the image within the second recognition range belongs.
[0071] Exemplarily, when the brightness of the image within the second recognition range falls within the reference brightness range, the computer device performs biometric feature recognition on the image within the second recognition range to identify the object to which the biometric feature contained in the image within the second recognition range belongs.
[0072] Biometric recognition refers to the identification of biometric features contained in an image in order to identify the object to which the biometric features belong. For example, a computer device stores reference images corresponding to multiple objects, each of which contains the object's biometric features. If the brightness of an image within a second recognition range falls within the reference brightness range, the image within the second recognition range is compared with the multiple reference images to determine which reference image contains the same biometric features as the image within the second recognition range. If the image within the second recognition range contains the same biometric features as any of the reference images, the biometric features contained in the image within the second recognition range are determined to be the biometric features of the object corresponding to the reference image.
[0073] In the embodiment of the present application, the image within the second identification range is equivalent to the local image of the second image containing the biometric feature. The brightness of the image within the second identification range falls within the reference brightness range, indicating that the local image of the second image containing the biometric feature is clear enough. Therefore, biometric feature recognition can be performed on the local image of the second image containing the biometric feature to identify which object the biometric feature belongs to, so as to ensure the accuracy of biometric feature recognition.
[0074] In the solution provided in the embodiments of the present application, during the biometric feature recognition process, a first recognition range is determined from a captured first image to determine the location of the biometric feature in the first image. The brightness of the image within the first recognition range is detected to determine whether the biometric feature in the first image is sufficiently clear. If the brightness of the image within the first recognition range does not fall within a reference brightness range, it is determined that the biometric feature in the first image is not clear enough. The exposure parameters are then adjusted so that the next image (i.e., the second image) is captured using the adjusted exposure parameters to improve the clarity of the biometric feature in the next captured image. If the brightness of the image within the second recognition range (i.e., the image containing the biometric feature) on the second image falls within the reference brightness range, it indicates that the biometric feature in the second image is sufficiently clear. At this time, biometric feature recognition is performed on the image within the second recognition range to identify the biometric feature of the object. This can avoid recognition errors or recognition failures due to unclear biometric features in the image, thereby improving the accuracy and success rate of biometric feature recognition.
[0075] In addition, considering that the time interval between capturing the first image and capturing the second image is short, the position of the biometric feature in the second image does not change much compared to the position of the biometric feature in the first image. Therefore, the position of the first recognition range in the first image can be used to determine the third recognition range from the second image, so that the second recognition range can be determined from the second image as quickly as possible using the third recognition range, thereby improving the efficiency of determining the second recognition range on the basis of ensuring that the image within the second recognition range contains the biometric feature.
[0076] Based on the embodiment shown in FIG2 , the embodiment of the present application can also adopt multiple scale transformations to utilize the multi-scale features of the first image to determine the first recognition range. The specific process is detailed in the following embodiment.
[0077] FIG3 is a flow chart of another biometric feature recognition method provided by an embodiment of the present application. The method is executed by a computer device. As shown in FIG3 , the method includes steps 301 to 309:
[0078] 301. A computer device performs multiple scale transformations on features of a first image to obtain multiple first features, where the scales of the multiple first features are different.
[0079] In the embodiment of the present application, considering that the meanings expressed by different scale features of the first image may be different, multi-scale features of the first image are obtained to enrich the feature expression method of the first image, so that the multi-scale features of the first image can be subsequently used to detect the position of the biometric features in the first image, thereby ensuring the accuracy of the first recognition range determined subsequently.
[0080] The features of the first image are used to characterize the first image. The features of the first image can be any type of features. For example, the features of the first image are color histogram features, directional gradient histogram features, etc. Multiple rescaling refers to performing multiple rescaling on features to obtain features of multiple scales, and the scales of the features obtained by each rescaling are different. For example, the features of the first image are subjected to multiple dimensionality reductions, and the features obtained by each dimensionality reduction are a first feature. Performing multiple dimensionality reductions on the features of the first image is equivalent to performing multiple rescaling on the features of the first image. For another example, the features of the first image are subjected to multiple dimensionality increases, and the features obtained by each dimensionality increase are a first feature. Performing multiple dimensionality increases on the features of the first image is equivalent to performing multiple rescaling on the features of the first image. Dimensionality reduction is used to reduce the scale of features, and dimensionality increase is used to increase the scale of features. In some embodiments, the scale of a feature can also be understood as the dimension of a feature.
[0081] In one possible implementation, the first image is an image captured in response to a biometric feature recognition instruction, and the first image is captured based on a first exposure parameter.
[0082] The biometric feature recognition instruction instructs to collect an image for biometric feature recognition. The first image may be the first image collected, or may not be the first image collected.
[0083] In an embodiment of the present application, when the first image is the first image captured in response to a biometric recognition instruction, the first exposure parameter is a default exposure parameter; when the first image is the nth image captured in response to a biometric recognition instruction, the first exposure parameter is adjusted based on the exposure parameter used to capture the n-1th image, where n is an integer greater than 1.
[0084] In an embodiment of the present application, in response to a biometric recognition instruction, an image is captured, and then the biometric features in the captured image are recognized. After the image is captured, a recognition range is determined from the captured image to determine the position of the biometric features in the captured image, and whether the brightness of the image within the recognition range falls within a reference brightness range is detected. If the brightness of the image within the recognition range does not fall within the reference brightness range, the exposure parameters are adjusted so that the next image can be captured using the adjusted exposure parameters, and then detected again. The above process is repeated until the brightness of the image within the recognition range determined from the currently captured image falls within the reference brightness range, and biometric recognition is performed on the image within the current recognition range.
[0085] Optionally, the computer device uses a camera collector to capture images of the shooting area to obtain a first image. The camera collector is used to capture images. As shown in Figure 4, the camera collector includes an IR (Infrared Radiation) emission polarization zone, an IR reception polarization zone, an RGB (Red Green Blue) light guide ring, an IR camera, an RGB camera, an IR LED (Light Emitting Diode), etc. For example, the camera collector can monitor whether a biometric feature exists in the shooting area. If a biometric feature is detected in the shooting area, the shooting area is captured to obtain an image.
[0086] In one possible implementation, step 301 includes: performing dimensionality reduction on the features of the first image to obtain a 1st first feature, performing dimensionality reduction on the i-th first feature to obtain an i+1-th first feature, where i is an integer greater than 0 and less than n. n refers to the number of first features, and n is an integer greater than 1. The value of n can be set based on experience or flexibly adjusted according to the application scenario, and is not limited in this embodiment of the present application.
[0087] In an embodiment of the present application, by multiple dimensionality reduction of the features of the first image, first features of multiple scales are obtained, so that the first features of multiple scales can all represent the first image, thereby ensuring the accuracy of the multiple first features obtained, thereby improving the accuracy of the determined first recognition range and improving the accuracy of biometric recognition.
[0088] In one possible implementation, step 301 includes: upgrading the feature of the first image to obtain the 1st first feature, upgrading the ith first feature to obtain the (i+1)th first feature, where i is an integer greater than 0 and less than n.
[0089] By multiple times upgrading the dimensions of the features of the first image, first features of multiple scales are obtained, so that the first features of multiple scales can all represent the first image, thereby ensuring the accuracy of the multiple first features obtained, thereby improving the accuracy of the determined first recognition range and improving the accuracy of biometric recognition.
[0090] In one possible implementation, step 301 includes: dividing the first image into blocks to obtain multiple image blocks; classifying each image block to obtain a category to which each image block belongs; based on the categories to which the multiple image blocks belong, forming a regional image from the image blocks belonging to a target category, the target category indicating that the image block contains a biological feature; performing multiple scale transformations on the features of the regional image to obtain multiple first features.
[0091] In an embodiment of the present application, considering that the first image may contain other content in addition to biometric features, the first image is divided into blocks and the image blocks contained in the first image are classified to extract a local image containing the biometric features from the first image, and then the features of the local image are extracted. The features of the local image are used as the features of the first image so that the features of the local image can be subsequently used to perform biometric feature recognition, thereby weakening the influence of other content in the first image, and ensuring that the extracted first features can more accurately characterize the biometric features, thereby improving the accuracy of the determined first recognition range and improving the accuracy of biometric feature recognition.
[0092] The size of the image block can be any size, for example, the size of the image block is 5×5. The sizes of multiple image blocks may be the same or different. Among the multiple image blocks, any image block may contain a complete biometric feature, any image block may contain a partial biometric feature, and any image block may not contain a biometric feature. The category to which the image block belongs indicates whether the image block contains a biometric feature. An image block belonging to the target category contains a biometric feature, and an image block belonging to the target category may contain a partial biometric feature or a complete biometric feature. The regional image is a local image in the first image that contains a biometric feature. The features of the regional image are used to represent the regional image. The features of the regional image can be any type of features, for example, the features of the regional image are color histogram features, directional gradient histogram features, etc.
[0093] Optionally, each image block is classified to obtain a weight for each image block, where the weight represents the possibility that the image block contains a biological feature. When the weight of the image block is not less than a threshold, the image block is determined to belong to the target category; when the weight of the image block is less than the threshold, the image block is determined to belong to another category.
[0094] The categories to which an image block belongs include the target category or other categories, where other categories are categories different from the target category. The weight of an image block is positively correlated with the likelihood that the image block contains a biometric feature. That is, the greater the weight of an image block, the greater the likelihood that the image block contains a biometric feature. For example, the weight of an image block ranges from [0, 1], where a weight of 0 indicates that the image block does not contain a biometric feature; a weight of 1 indicates that the image block contains a biometric feature. The threshold is an arbitrary value, such as 0.8.
[0095] For example, if the weight of an image block is 0.9 and the threshold is 0.8, and the weight of the image block is not less than the threshold, then the image block belongs to the target category. For another example, if the weight of an image block is 0.7 and the threshold is 0.8, and the weight of the image block is less than the threshold, then the image block belongs to another category.
[0096] Optionally, the process of determining the weight of the image block includes: performing feature extraction on the image block to obtain features of the image block; and performing feature conversion on the features of the image block to obtain the weight of the image block.
[0097] In an embodiment of the present application, by extracting the features of the image block and adopting a feature conversion method, for example, performing convolution processing on the features of the image block to convert the features of the image block into a value to represent the weight of the image block, so that the weight of the image block can indicate the possibility that the image block contains a biometric feature, ensuring the accuracy of the weight, and thus ensuring the accuracy of the category to which the image block belongs, it is beneficial to improve the reliability of the first feature, and then improve the accuracy of the determined first recognition range, thereby improving the accuracy of biometric feature recognition.
[0098] Optionally, the process of obtaining the features of the regional image includes: dividing the regional image into blocks to obtain multiple first image blocks, performing feature extraction on each first image block to obtain the features of each first image block; and splicing the features of multiple first image blocks to obtain the features of the regional image.
[0099] For example, the feature of each first image block is a histogram of oriented gradient feature, and the features of multiple first image blocks are adjacent end to end and spliced into a vector as the feature of the regional image.
[0100] Optionally, the process of obtaining a regional image includes: dividing the first image into blocks through an image recognition model to obtain multiple image blocks; classifying each image block to obtain the category to which each image block belongs; and based on the categories to which the multiple image blocks belong, forming a regional image from the image blocks belonging to the target category.
[0101] Exemplarily, the image recognition model is any network model, for example, a lightweight convolutional neural network. The image recognition model can divide the input image into blocks, determine the weight of each image block, and then output the area image containing the biometric features according to the weight. For example, the image recognition model divides the input image into blocks to obtain the features of multiple image blocks. The features of the multiple image blocks are passed through the Attention layer to obtain the weight of each image block, and then output the area image containing the biometric features according to the weight.
[0102] In one possible implementation, before acquiring the features of the first image, the first image can also be subjected to noise reduction to eliminate noise pixels in the first image, that is, the noise pixels in the first image are filtered. Exemplarily, the process of filtering the noise pixels in the first image includes: processing the noise pixels in the first image using a median filter. Median filtering is a nonlinear smoothing technique that sets the pixel value of each pixel to the median of the pixel values of all pixels within a certain neighborhood window of the pixel.
[0103] In the embodiment of the present application, median filtering is adopted to reduce the noise of the first image to adjust the pixel values of the noise pixels in the first image to ensure the accuracy of the filtered first image.
[0104] Optionally, based on the set window, the pixel values of the pixels in the first image are adjusted in a traversal manner.
[0105] For example, the width and height of the first image are determined, and the width and height of the window are determined; based on the window, traverse from the upper left corner of the first image, sort the pixel values of the pixels in the window to obtain a pixel value queue, and use the pixel value in the middle position of the queue in the pixel value queue (that is, the median of the pixel values of the pixels in the window) as the pixel value of the pixel corresponding to the center of the window. After that, move the window according to the step size, and sort the pixel values of the pixels in the window again in the above manner, so as to update the pixel values of the pixels corresponding to the center of the window, and so on, to complete the update of the pixel values of the pixels in the first image.
[0106] Optionally, based on the pixel value of the pixel point in the first image, the noise pixel point in the first image is determined, and based on a window centered on the noise pixel point, multiple reference pixel points are determined. The multiple reference pixel points are pixel points contained in the window centered on the noise pixel point. The pixel values of the multiple reference pixel points are sorted to obtain a pixel value queue, and the pixel value located in the middle position of the pixel value queue is used as the pixel value of the noise pixel point.
[0107] Optionally, the process of determining noise pixel points includes: traversing the first image based on a reference window, determining the average pixel value of the pixel points in the reference window during the traversal process, and determining that the pixel point is a noise pixel point when the absolute value of the difference between the pixel value of any pixel point in the reference window and the average pixel value is greater than a difference threshold. The difference threshold can be set based on experience or flexibly adjusted according to the application scenario, and this is not limited in the embodiments of the present application. The size of the reference window can be set based on experience or flexibly adjusted according to the application scenario, and this is not limited in the embodiments of the present application.
[0108] In an exemplary embodiment, in the case where noise reduction is performed on the first image before obtaining the features of the first image, the method for obtaining the features of the first image is: obtaining the first image after noise reduction; and performing feature extraction on the first image after noise reduction to obtain the features of the first image.
[0109] 302. The computer device updates each first feature respectively to obtain a second feature corresponding to each first feature.
[0110] In an embodiment of the present application, each first feature is updated separately through multiple first features so that each updated second feature incorporates other first features, thereby enhancing the correlation between features of different scales and ensuring the accuracy of the obtained second features.
[0111] In one possible implementation, step 302 includes: performing a scale transformation on the fifth feature to obtain a scaled fifth feature, where the scale of the scaled fifth feature is the same as the scale of the sixth feature; and fusing the scaled fifth feature with the sixth feature to obtain a second feature corresponding to the sixth feature. The sixth feature is any first feature from among the plurality of first features, and the fifth feature is any feature from among the plurality of first features other than the sixth feature.
[0112] In the embodiment of the present application, since the scales of the multiple first features are different, each first feature is updated by first performing scale transformation and then fusing them to ensure the accuracy of the obtained second feature.
[0113] 303. The computer device processes each second feature to obtain a fourth identification range.
[0114] In the embodiment of the present application, each second feature can represent the first image. By processing each second feature, the position of the biological feature in the first image can be predicted through the second feature of each scale, that is, multiple fourth recognition ranges can be obtained.
[0115] In the embodiments of the present application, determining the fourth recognition range from the first image refers to determining the location of the fourth recognition range in the first image, that is, determining the location of the biometric feature from the first image. Obtaining multiple fourth recognition ranges refers to determining multiple possible locations of the biometric feature from the first image.
[0116] In one possible implementation, step 303 includes performing biometric detection on each second feature to obtain a fourth identification range. The biometric detection is used to detect whether the first image contains a biometric feature based on the second feature, and if the first image is detected to contain a biometric feature, predict the location of the biometric feature in the first image. The location of the biometric feature in the first image predicted by the biometric detection is the fourth identification range.
[0117] In the embodiment of the present application, the features of the image are utilized and a biometric detection method is adopted to detect the position of the biometric in the image and obtain the recognition range, so that the recognition range indicates the position of the biometric, thereby ensuring the accuracy of the recognition range.
[0118] It should be noted that the above steps 301 to 303 can be performed by a target detection model. The target detection model is used to determine the location of the biological features in the image using the input image features. The target detection model can be any neural network model, for example, the target detection model includes a convolutional or feedforward neural network.
[0119] In one possible implementation, the target detection model includes a Backbone sub-model, a Neck sub-model, and a Head sub-model.
[0120] The Neck sub-model is used to perform the above step 302 and update the features of multiple scales. The Head sub-model is used to perform the above step 303 and output the position of the biological feature in the image based on the features of each scale (that is, the fourth recognition range). The Backbone sub-model is used to perform multiple scale transformations on the input image features. The Backbone sub-model can be any network model. For example, the Backbone sub-model is a neural network model composed of a convolution layer and a GRU (Gate Recurrent Unit) layer, and the convolution layer is a 2D (2 Dimensions, two-dimensional) convolution layer. For example, the Backbone sub-model includes a 2D convolution layer, a nonlinear activation function, a Dropout (a network layer), a pooling layer, a fully connected layer, etc. For another example, the Backbone sub-model is a neural network model composed of a convolution layer and an LSTM (Long Short-Term Memory, long short-term memory network) layer, and the convolution layer is a 3D convolution layer. For another example, the Backbone sub-model is composed of a 2D convolution layer and a maximum convolution network.
[0121] For example, the structure of the target detection model is shown in Figure 5. The Backbone sub-model includes multiple convolutional layers, which are used to perform multiple scale transformations on the input image features. The Neck sub-model includes upsampling layers, downsampling layers, and pooling layers. These layers update the features at each scale based on the features at multiple scales. The Head sub-model includes multiple detection modules, each of which is used to detect features at different scales and output the location of the biometric feature. For example, the detection module is YOLO V3 (You Only Look Once V3, the current third version of the detection algorithm).
[0122] 304. The computer device determines a first recognition range based on the obtained multiple fourth recognition ranges, and the image within the first recognition range contains a biometric feature.
[0123] In the embodiment of the present application, considering that the meanings expressed by different scale features of the first image may be different, multi-scale features of the first image are obtained to enrich the feature expression of the first image, and the multi-scale features of the first image are used to determine the possible location of the biometric feature from the first image, that is, to determine multiple fourth recognition ranges. Based on the multiple fourth recognition ranges, the exact location of the biometric feature can be determined, that is, the first recognition range can be determined to ensure the accuracy of the determined first recognition range.
[0124] In one possible implementation, step 304 includes: based on the confidence of each fourth recognition range, determining the fourth recognition range with the highest confidence among multiple fourth recognition ranges as the first recognition range, and the confidence of each fourth recognition range indicates the possibility that the image within each fourth recognition range contains biometric features.
[0125] The confidence level of the fourth identification range is positively correlated with the likelihood that an image within the fourth identification range contains a biometric feature. That is, the greater the confidence level of the fourth identification range, the greater the likelihood that an image within the fourth identification range contains a biometric feature. For example, the confidence level of the fourth identification range ranges from [0, 1]. A confidence level of 0 indicates that an image within the fourth identification range does not contain a biometric feature; a confidence level of 1 indicates that an image within the fourth identification range contains a biometric feature.
[0126] In an embodiment of the present application, when each fourth recognition range is obtained, the confidence of each fourth recognition range can also be obtained. The confidence can reflect the possibility that the image within the fourth recognition range contains biometric features. Therefore, the fourth recognition range with the highest confidence is determined as the first recognition range to ensure that the image within the determined first recognition range contains biometric features, ensure the accuracy of the first recognition range, and improve the accuracy of biometric recognition.
[0127] Optionally, the process of obtaining the confidence level of the fourth recognition range includes performing biometric detection on the second feature to obtain the fourth recognition range and the confidence level of the fourth recognition range. In other words, in addition to detecting whether the first image contains the biometric feature based on the second feature and predicting the fourth recognition range if the first image is detected to contain the biometric feature, the biometric detection further outputs the confidence level of the predicted fourth recognition range.
[0128] 305. If the brightness of the image within the first recognition range does not fall within the reference brightness range, the computer device adjusts the first exposure parameter to obtain a second exposure parameter.
[0129] In one possible implementation, the process of determining the brightness of the image within the first recognition range includes: determining the brightness of the image within the first recognition range based on pixel values of pixels in the image within the first recognition range.
[0130] In an embodiment of the present application, since the pixel values of the pixel points in the image within the first recognition range can reflect the brightness of each pixel point, the brightness of the image within the first recognition range is determined based on the pixel values of the pixel points in the image within the first recognition range to ensure the accuracy of the determined brightness.
[0131] Optionally, the pixel value of each pixel is expressed in RGB (Red Green Blue) format, and the process of determining the brightness of the image within the first recognition range includes: for each pixel in the image within the first recognition range, weighting the R value, G value and B value of the pixel to obtain the brightness of the pixel, and determining the average value of the brightness of the pixels in the image within the first recognition range as the brightness of the image within the first recognition range.
[0132] In an embodiment of the present application, the pixel value of each pixel is represented by the color of the three channels of red, green and blue. By weighting the color values of the three channels of red, green and blue for each pixel, the brightness of each pixel can be obtained, and then based on the brightness of the pixels in the image within the first recognition range, the brightness of the image within the first recognition range can be determined.
[0133] In one possible implementation, the method of adjusting the first exposure parameter includes: when the brightness of the image within the first recognition range is less than the minimum value in the reference brightness range, increasing the first exposure parameter to obtain the second exposure parameter; or, when the brightness of the image within the first recognition range is greater than the maximum value in the reference brightness range, reducing the first exposure parameter to obtain the second exposure parameter.
[0134] In an embodiment of the present application, when the brightness of the image within the first recognition range does not fall within the reference brightness range, the first exposure parameter is adjusted based on the relationship between the brightness of the image within the first recognition range and the brightness value within the reference brightness range, so that when the image is subsequently captured based on the obtained second exposure parameter, the brightness of the image within the range where the biometric feature is located in the captured image can be guaranteed to fall within the reference brightness range as much as possible, so as to ensure the accuracy of the determined second exposure parameter. After the second image is captured according to such second exposure parameter, the probability of the brightness of the image within the second recognition range on the second image falling within the reference brightness range is high, which is conducive to increasing the possibility of directly performing biometric recognition based on the image within the second recognition range, thereby improving the efficiency of biometric recognition.
[0135] 306. The computer device captures a second image based on the second exposure parameter, where the second image includes a biometric feature.
[0136] In one possible implementation, the computer device includes an image sensor, and step 306 includes: adjusting an exposure parameter of the image sensor to a second exposure parameter, and capturing an image using the adjusted image sensor to obtain a second image.
[0137] In an embodiment of the present application, the image sensor in the computer device is used to capture images. The computer device captures the screen within the shooting area into an image through the image sensor. Therefore, the exposure parameter of the image sensor is first adjusted to a second exposure parameter, so that the image can be captured with the second exposure parameter through the adjusted image sensor to obtain a second image.
[0138] 307. The computer device determines a third recognition range from the second image based on the position of the first recognition range in the first image, where the position of the third recognition range in the second image is the same as the position of the first recognition range in the first image.
[0139] In one possible implementation, step 307 includes: determining position parameters of the first recognition range in the first image, and based on the position parameters of the first recognition range in the first image, determining a third recognition range in the second image, and the position parameters of the third recognition range in the second image are the same as the position parameters of the first recognition range in the first image.
[0140] Exemplarily, the position parameters of the first recognition range in the first image indicate the position of the first recognition range in the first image, and the position parameters include coordinates. The position parameters of the first recognition range in the first image can be expressed in any form. For example, if the first recognition range is a square range, the position parameters of the first recognition range in the first image include the center coordinates and side lengths of the first recognition range; or, the position parameters of the first recognition range in the first image include the coordinates of the four corners. For another example, if the first recognition range is a circular area, the position parameters of the first recognition range in the first image include the center coordinates and radius of the first recognition range.
[0141] In an embodiment of the present application, the first image and the second image have the same size. By determining the position parameters of the first recognition range in the first image, the third recognition range can be determined in the second image according to the position parameters of the first recognition range in the first image, so as to ensure that the position of the determined third recognition range in the second image is the same as the position of the first recognition range in the first image, thereby ensuring the accuracy of the determined third recognition range.
[0142] 308. The computer device adjusts the position of the third recognition range in the second image to obtain a second recognition range, and the image within the second recognition range contains the biometric feature.
[0143] In one possible implementation, step 308 includes: for each pixel point within the third recognition range, determining the probability corresponding to each pixel point, where the probability corresponding to each pixel point is the probability that the image within the reference recognition range centered on each pixel point contains the biometric feature, and the size of the reference recognition range is the same as the size of the third recognition range; based on the probability corresponding to each pixel point within the third recognition range, adjusting the position of the third recognition range in the second image to obtain the second recognition range.
[0144] The determined probabilities include multiple ones, each corresponding to a pixel within the third recognition range. The probability corresponding to any pixel indicates the likelihood that an image within the reference recognition range centered on that pixel contains the biometric feature. The probability corresponding to any pixel is positively correlated with the likelihood that an image within the reference recognition range centered on that pixel contains the biometric feature. That is, the greater the probability corresponding to any pixel, the greater the likelihood that an image within the reference recognition range centered on that pixel contains the biometric feature. The reference recognition range is a recognition range of the same size as the third recognition range.
[0145] In this embodiment of the present application, a probability corresponding to each pixel within the third recognition range is determined to determine the likelihood that the image within the reference recognition range centered on each pixel contains the biometric feature. Based on the determined probability, the position of the third recognition range within the second image is adjusted so that the image within the adjusted second recognition range contains the biometric feature, thereby ensuring the accuracy of the second recognition range and, consequently, the accuracy of biometric recognition.
[0146] Optionally, the process of determining the second recognition range includes: determining the target pixel point with the highest probability among the pixel points within the third recognition range; adjusting the position of the third recognition range in the second image to a position centered on the target pixel point to obtain the second recognition range, and the size of the third recognition range is the same as the size of the second recognition range.
[0147] In the embodiment of the present application, the greater the probability corresponding to any pixel point, the greater the possibility that the image within the reference recognition range centered on the pixel point contains the biometric feature. Therefore, the maximum probability is determined from the multiple probabilities determined, and the pixel point corresponding to the maximum probability is determined as the target pixel point, and then the third recognition range is moved so that the center of the moved recognition range is located on the target pixel point, so as to ensure that the image within the obtained second recognition range contains the biometric feature, thereby ensuring the accuracy of the obtained second recognition range, and thereby ensuring the accuracy of biometric feature recognition.
[0148] It should be noted that the embodiment of the present application is described by taking the position of the third recognition range as an example for adjustment. In another embodiment, it is also possible to determine a new recognition range with a target pixel point in the above manner; then, for each pixel point in the new recognition range, determine the probability corresponding to each pixel point in the new recognition range, and determine the next target pixel point based on the currently determined probability, so as to determine the next recognition range as the center of the next target pixel point; when the distance between the currently determined target pixel point and the previous target pixel point is less than the first threshold, or when the currently determined maximum probability (that is, the probability corresponding to the currently determined target pixel point) is greater than the second threshold, the currently determined recognition range is determined as the second recognition range. The first threshold and the second threshold can be set based on experience, or can be flexibly adjusted according to the application scenario, and the embodiment of the present application does not limit this.
[0149] Optionally, the process of determining the probability includes: determining the pixel features of each pixel point within the third identification range, for the first pixel point within the third identification range, determining the distance between the pixel features of each second pixel point and the pixel features of the first pixel point, and determining the average value of multiple distances as the probability corresponding to the first pixel point, and the probability corresponding to the first pixel point is the probability that the image within the reference identification range centered on the first pixel point contains the biological feature.
[0150] The first pixel is any pixel within the third identification range, and the second pixel is a pixel other than the first pixel within the reference identification range centered on the first pixel. The pixel features of the pixel can be represented in any form, for example, the pixel features of the pixel are color histogram features of the pixel.
[0151] In an embodiment of the present application, the Mean Shift method is adopted to determine the probability corresponding to each pixel point within the third recognition range, that is, to determine the probability that the image within the reference recognition range centered on each pixel point within the third recognition range contains biological features.
[0152] In an embodiment of the present application, the optical flow method is used to determine the second recognition range on the second image. Taking into account that in the process of biometric feature recognition, the position difference of the biometric features in the two adjacent images collected is small, therefore, the first recognition range on the first image is combined to determine the third recognition range on the second image, and then the second recognition range is determined by pixel clustering to ensure the accuracy of the determined second recognition range.
[0153] Optionally, the process of determining the target pixel point includes: determining the color histogram characteristics of the pixel points within the third recognition range, taking kernel density estimation based on the color histogram characteristics of the pixel points within the third recognition range, determining the probability distribution of the pixel points, and determining the pixel point with the largest probability density in the probability distribution as the target pixel point.
[0154] In one possible implementation, step 308 includes: determining an adjustment distance and an adjustment direction based on the position of a first key point in the first image and the position of a second key point in the second image, where the first key point and the second key point are the same key point of the biometric feature; and adjusting the position of the third recognition range in the second image based on the adjustment distance and the adjustment direction to obtain a second recognition range. Exemplarily, the adjustment distance and the adjustment direction may also be referred to as the movement distance and movement direction of the biometric feature, where the movement distance and movement direction of the biometric feature refer to the movement distance and movement direction of the biometric feature in the second image compared to the first image. Adjusting the position of the third recognition range in the second image based on the adjustment distance and the adjustment direction may refer to moving the third recognition range based on the movement distance and movement direction of the biometric feature.
[0155] The first key point is a key point of the biometric feature in the first image, and the second key point is a key point of the biometric feature in the second image. The first key point and the second key point are the same key point of the biometric feature. For example, the first key point is the center point of the biometric feature in the first image, and the second key point is the center point of the biometric feature in the second image. The first key point can be any key point, for example, the center point of the biometric feature, or an edge point of the biometric feature.
[0156] In an embodiment of the present application, the position of the biometric feature in the second image may change relative to the first image, and the key points of the biometric feature will also change. Therefore, when determining the area where the biometric feature is located in the first image, the key points of the biometric feature in the first image and the key points in the second image are identified, so as to determine the movement distance and movement direction of the biometric feature in the second image compared with the first image according to the positions of the key points of the biometric feature in the first image and the key points in the second image, and then move the mapped third recognition range according to the movement distance and movement direction to change the position of the third recognition range to obtain the second recognition range, so as to ensure that the image within the obtained second recognition range contains the biometric feature, thereby ensuring the accuracy of the obtained second recognition range and the accuracy of biometric recognition.
[0157] Optionally, the process of determining the first key point includes: performing key point recognition on the image within the first recognition range to obtain the first key point.
[0158] In an embodiment of the present application, by performing key point recognition on images within the first recognition range, there is no need to perform key point recognition on images in other areas, so as to ensure that the first key point can be obtained as soon as possible, and to ensure the accuracy and efficiency of obtaining the first key point.
[0159] It should be noted that the process of determining the second key point is the same as the process of determining the first key point mentioned above, and will not be repeated here.
[0160] It should be noted that the embodiment of the present application is described using a first key point and a second key point as an example. In another embodiment, the adjustment distance and adjustment direction can be determined based on the positions of multiple first key points in the first image and the positions of multiple second key points in the second image. The multiple first key points correspond one-to-one to the multiple second key points, and the first key point and the corresponding second key point are the same key point of the biometric feature. Based on the adjustment distance and adjustment direction, the position of the third recognition range in the second image is adjusted to obtain the second recognition range.
[0161] In one possible implementation, the process of determining the adjustment distance and adjustment direction based on multiple first key points and multiple second key points includes: for each first key point, based on the position of the first key point and the position of the corresponding second key point, determining the first distance and the first direction, the first direction points from the first key point to the second key point, determining the average value of the multiple first distances as the adjustment distance, and determining the average value of the multiple first directions as the adjustment direction.
[0162] In the embodiment of the present application, the first direction is expressed as an angle, which is equivalent to the angle between the ray pointing from the point corresponding to the coordinates of the first key point to the point corresponding to the coordinates of the second key point in the XY coordinate system and the X-axis.
[0163] In one possible implementation, step 308 includes: determining an adjustment distance and an adjustment direction based on the position of the first key point in the first image and the position of the second key point in the second image, where the first key point and the second key point are the same key point of the biometric feature; adjusting the position of the third recognition range in the second image based on the adjustment distance and the adjustment direction to obtain a fifth recognition range; for each pixel point in the fifth recognition range, determining the probability corresponding to each pixel point in the fifth recognition range, where the probability corresponding to each pixel point is the probability that the image within the reference recognition range centered on each pixel point contains the biometric feature; adjusting the position of the fifth recognition range in the second image based on the determined probability corresponding to each pixel point in the fifth recognition range to obtain a second recognition range.
[0164] In an embodiment of the present application, the position of the biometric feature in the second image may change relative to the first image, and the key points of the biometric feature will also change. Considering the possibility that the image within the reference recognition range centered on any pixel point within the recognition range contains the biometric feature, when determining the first recognition range from the first image, the key points of the biometric feature in the first image and the key points in the second image are identified, so as to determine the movement distance and direction of the biometric feature in the second image compared with the first image according to the positions of the key points of the biometric feature in the first image and the positions of the key points in the second image. Then, according to the movement distance and the movement direction, the mapped third recognition range is moved to obtain a fifth recognition range. Thereafter, based on the probability corresponding to the pixel points within the fifth recognition range, the position of the fifth recognition range in the second image is adjusted so that the image within the adjusted second recognition range contains the biometric feature, thereby ensuring the accuracy of the obtained second recognition range and thus ensuring the accuracy of biometric recognition.
[0165] 309. When the brightness of the image within the second recognition range falls within the reference brightness range, the computer device identifies the object to which the biometric feature contained in the image within the second recognition range belongs.
[0166] Exemplarily, when the brightness of the image within the second recognition range falls within the reference brightness range, the computer device performs biometric feature recognition on the image within the second recognition range to identify the object to which the biometric feature contained in the image within the second recognition range belongs.
[0167] In one possible implementation, the process of performing biometric feature recognition on an image includes: when the brightness of an image within a second recognition range falls within a reference brightness range, comparing the image within the second recognition range with multiple reference images, obtaining similarities between the image within the second recognition range and each reference image, and determining object information of the reference image corresponding to the greatest similarity as the object information matching the image within the second recognition range. The object information matching the image within the second recognition range is used to characterize the object to which the biometric feature contained in the image within the second recognition range belongs.
[0168] In the embodiment of the present application, each reference image contains a biometric feature. Multiple reference images contain different biometric features. Each reference image corresponds to an object. The biometric feature contained in the reference image is the biometric feature of the object represented by the object information. The greater the similarity between an image within the second recognition range and any reference image, the more similar the biometric feature contained in the image within the second recognition range is to the biometric feature contained in the reference image. Therefore, determining similarity is used to perform biometric recognition to ensure the accuracy of biometric recognition.
[0169] In the solution provided in the embodiments of the present application, during the biometric feature recognition process, a first recognition range is determined from a captured first image to determine the position of the biometric feature in the first image. The brightness of the image within the first recognition range is detected to determine whether it is sufficient to determine whether the biometric feature in the first image is sufficiently clear. If the brightness of the image within the first recognition range does not fall within a reference brightness range, it is determined that the biometric feature in the first image is not clear enough. Then, the exposure parameters are adjusted so that the next image (i.e., the second image) is captured using the adjusted exposure parameters to improve the clarity of the biometric feature in the next captured image. Considering that the time interval between capturing the first image and capturing the second image is short, the position of the biometric feature in the second image does not change much compared to the position of the biometric feature in the first image. Therefore, the position of the first recognition range in the first image is used to determine a third recognition range from the second image, so that the second recognition range can be determined from the second image as quickly as possible using the third recognition range, so that the image within the second recognition range contains the biometric feature. When the brightness of the image within the second recognition range falls within the reference brightness range, it means that the biometric features in the second image are clear enough. At this time, biometric feature recognition is performed on the image within the second recognition range to identify which object the biometric features belong to. This can avoid recognition errors or recognition failures due to unclear biometric features in the image, thereby improving the accuracy and success rate of biometric recognition.
[0170] It should be noted that the embodiment shown in Figure 3 above is illustrated by taking the example that the brightness of the image within the first recognition range does not fall within the reference brightness range, and the brightness of the image within the second recognition range falls within the reference brightness range. In another embodiment, biometric recognition can also be performed on images within other recognition ranges.
[0171] In one possible implementation, the method further includes: performing biometric feature recognition on the image within the first recognition range when the brightness of the image within the first recognition range falls within a reference brightness range. In other words, when the brightness of the image within the first recognition range falls within the reference brightness range, identifying the object to which the biometric feature contained in the image within the first recognition range belongs.
[0172] In an embodiment of the present application, when the brightness of the image within the first recognition range falls within the reference brightness range, it indicates that the image within the first recognition range is clear enough, and the biometric features contained in the image within the first recognition range can be biometrically recognized. Therefore, when the brightness of the image within the first recognition range falls within the reference brightness range, biometric recognition is performed on the image within the first recognition range without collecting other images, so as to ensure the efficiency of biometric recognition.
[0173] In one possible implementation, the method further includes: when the brightness of the image within the second recognition range does not fall within the reference brightness range, adjusting the second exposure parameter to obtain a third exposure parameter; capturing a next image based on the third exposure parameter, and performing biometric recognition based on the next image.
[0174] In an embodiment of the present application, if the brightness of the image within the second recognition range does not fall within the reference brightness range, it means that the image within the second recognition range is not clear enough, so the exposure parameters used when capturing the current image are adjusted so that the next image can be captured using the adjusted exposure parameters, so that a clearer image can be captured to ensure the accuracy of subsequent biometric recognition.
[0175] For example, in response to a biometric recognition instruction, a first image is captured based on a first exposure parameter, a first recognition range is determined from the first image, and the image within the first recognition range contains the biometric feature; if the brightness of the image within the first recognition range on the first image falls within a reference brightness range, biometric recognition is performed on the image within the first recognition range; if the brightness of the image within the first recognition range does not fall within the reference brightness range, the first exposure parameter is adjusted to obtain a second exposure parameter; a second image is captured based on the second exposure parameter; a second recognition range is determined from the second image, and the image within the second recognition range contains the biometric feature; if the brightness of the image within the second recognition range falls within the reference brightness range, biometric recognition is performed on the image within the second recognition range; if the brightness of the image within the second recognition range does not fall within the reference brightness range, the second exposure parameter is adjusted to obtain a third exposure parameter; so that a next image is captured based on the third exposure parameter, and the above process is repeated to ensure that the brightness of the image within the currently determined recognition range falls within the reference brightness range, and biometric recognition is then performed on the image within the currently determined recognition range.
[0176] It should be noted that the embodiment shown in FIG3 is described by using the features of the first image to determine the first recognition range as an example. In another embodiment, there is no need to perform the above steps 301-304, but other methods are adopted to determine the first recognition range from the first image.
[0177] In one possible implementation, when the first image is not the first image collected in response to a biometric recognition instruction, the seventh recognition range is determined from the first image based on the position of the sixth recognition range in the third image, the position of the sixth recognition range in the third image is the same as the position of the seventh recognition range in the first image, the image within the sixth recognition range contains biometrics, and the third image is the previous image of the first image; the position of the seventh recognition range in the first image is adjusted to obtain the first recognition range.
[0178] The process of determining the first identification range is similar to the above steps 307 - 308 and will not be repeated here.
[0179] In one possible implementation, the process of determining the first recognition range includes: performing key point detection on the first image to obtain multiple target key points in the first image; and determining the first recognition range from the first image based on the relative positional relationship between the multiple target key points and the biometric features and the positions of the multiple target key points in the first image.
[0180] A target keypoint is any type of keypoint. For example, if the target keypoint is a finger keypoint and the biometric feature is a feature of the palm region (i.e., a palm print feature), then in an image containing a hand, the relative positional relationship between the finger and palm regions remains unchanged regardless of where the palm region is located in the image. The relative positional relationship indicates the relationship between the positions of multiple target keypoints and the positions of the biometric feature. For example, the relative positional relationship indicates that the biometric feature is located below multiple target keypoints, or indicates that the biometric feature is located between multiple target keypoints.
[0181] In the embodiment of the present application, a relative positional relationship exists between the biometric feature and multiple target key points. In the captured image, regardless of the biometric feature's location within the image, the relative positional relationship between the biometric feature and the multiple target key points remains unchanged. Therefore, key point detection is performed on the first image to detect multiple target key points that have a relative positional relationship with the biometric feature. Based on the positions of the multiple target key points within the first image and the relative positional relationship between the multiple target key points and the biometric feature, a first recognition range is determined from the first image. The first recognition range can reflect the location of the biometric feature, thus ensuring the accuracy of the first recognition range and, in turn, the accuracy of biometric feature recognition.
[0182] On the basis of the embodiments shown in FIG. 2 to FIG. 3 above, the embodiment of the present application can also determine the second recognition range by comparing the first image with the second image. The specific process is detailed in the following embodiment.
[0183] FIG6 is a flow chart of another biometric feature recognition method provided by an embodiment of the present application. The method is executed by a computer device. As shown in FIG6 , the method includes steps 601 to 608:
[0184] 601. A computer device determines a first recognition range from a first image, where the image within the first recognition range contains a biometric feature and the first image is acquired based on a first exposure parameter.
[0185] 602. When the brightness of the image within the first recognition range does not fall within the reference brightness range, the computer device adjusts the first exposure parameter to obtain a second exposure parameter.
[0186] 603. The computer device captures a second image based on the second exposure parameter, where the second image includes a biometric feature.
[0187] Steps 601-603 are similar to the above steps 201-203 and will not be repeated here.
[0188] 604. The computer device performs feature extraction on the first image and the second image respectively to obtain a third feature and a fourth feature, where the third feature indicates the first image and the fourth feature indicates the second image.
[0189] Exemplarily, the third feature and the fourth feature can be represented in any form. For example, the third feature and the fourth feature can be represented in the form of color histogram features, directional gradient histogram features, etc.
[0190] In one possible implementation, the method of obtaining the third feature includes: dividing the first image into blocks to obtain multiple image blocks, performing feature extraction on each image block to obtain the features of each image block, and splicing the features of multiple image blocks to obtain the features of the first image (i.e., the third feature).
[0191] Exemplarily, the features of the image blocks can be any type of features, for example, the features of the image blocks are oriented gradient histogram features. The oriented gradient histogram features of multiple image blocks in the first image are adjacent end to end to form a vector to obtain the features of the first image.
[0192] It should be noted that the process of obtaining the fourth feature is the same as that of obtaining the third feature, and will not be repeated here.
[0193] 605. The computer device processes the third feature and the fourth feature to obtain motion information, where the motion information indicates a change in the position of the biometric feature in the second image relative to the first image.
[0194] In an embodiment of the present application, the third feature is used to represent the first image, and the fourth feature is used to represent the second image, that is, the third feature can represent the position of the biometric feature in the first image, and the fourth feature can represent the position of the biometric feature in the second image. By processing the third feature and the fourth feature, the comparison between the first image and the second image can be achieved to determine the change in the position of the biometric feature in the second image compared with the first image.
[0195] Exemplarily, the motion information can be represented in any form, for example, the motion information is represented in the form of a probability map.
[0196] 606. The computer device updates the motion information based on the third feature to obtain updated motion information.
[0197] In an embodiment of the present application, the motion information is updated based on the third feature so that the updated motion information can better reflect the change in the position of the biometric feature in the second image compared with the first image, so as to subsequently determine whether to use the first recognition range on the first image to determine the position of the biometric feature in the second image.
[0198] 607. The computer device processes the fourth feature and the updated motion information to obtain a second recognition range.
[0199] In an embodiment of the present application, the third feature can indicate the position of the biometric feature in the first image, and the fourth feature can indicate the position of the biometric feature in the second image. By processing the third feature and the fourth feature, a comparison between the first image and the second image can be achieved to determine the change in the position of the biometric feature in the second image compared with the first image. Based on the third feature, the motion information is updated so that the updated motion information can better reflect the change in the position of the biometric feature in the second image compared with the first image. The fourth feature can indicate the content of the second image. The fourth feature and the updated motion information are processed to obtain the position of the biometric feature in the second image to ensure the accuracy of the second recognition range, thereby ensuring the accuracy of the biometric recognition.
[0200] In one possible implementation, steps 604-607 are performed by a target detection model.
[0201] As shown in Figure 7, the target detection model convolves the third and fourth features to obtain motion information, which can be represented by a probability map. The third feature and the motion probability map are convolved to obtain updated motion information, which includes a first label or a second label. The first label indicates that the position of the biometric feature in the second image has changed significantly relative to the first image; the first label and the features of the second image are then combined to determine the second recognition range, while the second label indicates that the position of the biometric feature in the second image has not changed much relative to the first image; the second recognition range in the second image can be determined based on the first recognition range in the first image. If the updated motion information is the first label, the first label and the fourth feature are convolved to obtain the second recognition range.
[0202] Optionally, the process of processing the fourth feature and the updated motion information includes: fusing the fourth feature and the updated motion information to obtain a fused feature; performing multiple scale transformations on the fused feature to obtain multiple seventh features, each of which has a different scale; updating each seventh feature based on the multiple seventh features to obtain an eighth feature corresponding to each seventh feature; processing each eighth feature to obtain an eighth recognition range; and determining a second recognition range based on the obtained multiple eighth recognition ranges. It should be noted that the process of determining the second recognition range is similar to steps 301-304 above and will not be repeated here.
[0203] 608. When the brightness of the image within the second recognition range falls within the reference brightness range, the computer device identifies the object to which the biometric feature contained in the image within the second recognition range belongs.
[0204] The step 608 is similar to the above step 309 and will not be described again here.
[0205] In the solution provided in the embodiments of the present application, during the biometric feature recognition process, a first recognition range is determined from a captured first image to determine the position of the biometric feature in the first image. The brightness of the image within the first recognition range is detected to determine whether it is sufficient to determine whether the biometric feature in the first image is sufficiently clear. If the brightness of the image within the first recognition range does not fall within a reference brightness range, it is determined that the biometric feature in the first image is not clear enough. Then, the exposure parameters are adjusted so that the next image (i.e., the second image) is captured using the adjusted exposure parameters to improve the clarity of the biometric feature in the next captured image. Considering that the time interval between capturing the first image and capturing the second image is short, the position of the biometric feature in the second image does not change much compared to the position of the biometric feature in the first image. Therefore, the position of the first recognition range in the first image is used to determine a third recognition range from the second image, so that the second recognition range can be determined from the second image as quickly as possible using the third recognition range, so that the image within the second recognition range contains the biometric feature. When the brightness of the image within the second recognition range falls within the reference brightness range, it means that the biometric features in the second image are clear enough. At this time, biometric feature recognition is performed on the image within the second recognition range to identify which object the biometric features belong to. This can avoid recognition errors or recognition failures due to unclear biometric features in the image, thereby improving the accuracy and success rate of biometric recognition.
[0206] It should be noted that the above-mentioned method of determining the second recognition range from the second image is only an exemplary description, and the embodiments of the present application are not limited thereto.
[0207] In some embodiments, the second recognition range can be determined from the second image by performing multiple scale transformations on features of the second image to obtain multiple ninth features, each of which has different scales; updating each ninth feature based on the multiple ninth features to obtain a tenth feature corresponding to each ninth feature; processing each tenth feature to obtain a ninth recognition range; and determining the second recognition range based on the obtained multiple ninth recognition ranges. The principles of this process for determining the second recognition range are the same as those of the process for determining the first recognition range based on steps 301 to 304 and are not further described here.
[0208] In some embodiments, determining the second recognition range from the second image can include performing key point detection on the second image to obtain multiple target key points in the second image; and determining the second recognition range from the second image based on the relative positional relationship between the multiple target key points and the biometric features, as well as the positions of the multiple target key points in the second image. The principles of this process for determining the second recognition range are the same as those of determining the first recognition range by performing key point detection on the first image, as described above, and will not be further elaborated here.
[0209] It should be noted that, based on the embodiment shown in FIG6 , before implementing the biometric feature recognition method using the target detection model, the target detection model must be trained. The target detection model training process is shown in FIG8 . The method includes: image acquisition, image annotation, image preprocessing, model construction, initialization of model weights, model training, and model parameter adjustment.
[0210] (1) Image acquisition and image annotation: multiple sample images are acquired and a sample label for each sample image is determined. The sample label indicates the type of biometric features contained in the sample image. The sample recognition range is determined from the sample image. The images within the sample recognition range contain biometric features.
[0211] In the embodiment of the present application, the biometric features include multiple types. For example, if the biometric features are features of the left hand or the right hand, the label includes a first sample label or a second sample label. The first sample label indicates the biometric features of the left hand, and the second sample label indicates the biometric features of the right hand. For example, the sample image is shown in Figure 9.
[0212] The sample images include positive sample images or negative sample images. The positive sample images are images obtained by photographing the biometric features, and the negative sample images are images that do not contain the biometric features, or images that contain unclear biometric features.
[0213] In one possible implementation, when a sample image is obtained, the sample image will also be cleaned. The process of cleaning the sample image includes: filtering out repeated sample images among multiple sample images, sample images containing incomplete biometric features, sample images with too low clarity, etc.
[0214] In the embodiment of the present application, the sample images are cleaned to ensure the quality of the sample images, thereby ensuring the quality of subsequent model training.
[0215] (2) Image preprocessing: Use median filtering to reduce the noise of the sample image to eliminate the noise pixels in the sample image; then, use block segmentation to divide the sample image into multiple image blocks, determine the category of each image block, and form a regional image with the image blocks belonging to the target category. The regional image contains biological features; use the method of extracting directional gradient histogram features to extract the directional gradient histogram features of each image block in the regional image; connect the directional gradient histogram features of multiple image blocks in the regional image end to end and combine them into a one-dimensional vector, which is used as the feature of the sample image.
[0216] In one possible implementation, the following function is used to determine the directional gradient histogram feature of the image block:
[0217] θ(x,y)∈[0,360°), or θ(x,y)∈[0,180°)
[0218] Among them, x is used to represent the horizontal coordinate of the pixel point in the image block, y is used to represent the vertical coordinate of the pixel point in the image block, and I x Used to represent the gradient value of the pixel in the horizontal direction, I y It is used to represent the vertical gradient value of the pixel point, M(x,y) is used to represent the magnitude of the gradient, and θ(x,y) is used to represent the direction of the gradient. The magnitude and direction of the gradient are the features of the directional gradient histogram.
[0219] In the embodiment of the present application, the resolution is 60x60, the Sobel (edge detection) algorithm is adopted, and the directional gradient histogram feature of the image block is determined according to the above function.
[0220] (3) Model construction and initialization of model weights: Build an initialized target detection model and initialize the weights of the target detection model.
[0221] (4) Model training and model parameter adjustment: The features of the sample image are processed through the target detection model to obtain the predicted recognition range; based on the sample recognition range and the predicted recognition range, the model parameters of the target detection model are adjusted to achieve the training of the target detection model.
[0222] In one possible implementation, the IOU (Intersection Of Union) and mapIOU (mean Average Precision Intersection Of Union) methods are used to determine a loss value based on the sample recognition range and the predicted recognition range. The loss value indicates the difference between the sample recognition range and the predicted recognition range. The target detection model is trained based on the loss value.
[0223] It should be noted that after the target detection model is trained according to the above embodiment, the target detection model can be packaged into an SDK (Software Development Kit), as shown in Figure 10. The model packaging process includes: selecting the inference device, converting the target detection model, deploying it on the terminal side, deeply optimizing the model, and obtaining SDK integration.
[0224] Inference devices include NPUs (Neural Network Processing Units) or CPUs (Central Processing Units). Data types include INT8 (a data type) or INT16 (a data type). Terminal-side deployment methods include hardware abstraction layers, platform abstraction, or model parsing. Deep optimization methods include operator optimization, scheduling optimization, or memory optimization. For example, select NPU as the inference device, select INT8 and INT16 as the data types, adopt hardware abstraction layer deployment, adopt scheduling optimization, and generate an SDK.
[0225] Based on the embodiments shown in FIG. 2 to FIG. 9 above, the embodiment of the present application further provides a flowchart of a biometric feature recognition method, as shown in FIG. 11 . The method includes the following steps 1 to 6:
[0226] Step 1: In response to a biometric recognition instruction, capture the first image based on default exposure parameters.
[0227] Step 2: Detect the first image through the target detection model to obtain the first recognition range. The image within the first recognition range contains the biological feature.
[0228] Step 3: Set the weights of the pixels within the first recognition range in the first image to 255, and set the weights of the remaining pixels in the first image to 0; determine the brightness of the first image according to the pixel values and weights of the pixels in the first image; since the weights of the pixels outside the first recognition range in the first image are 0, the brightness of the first image is the brightness of the image within the first recognition range.
[0229] As shown in FIG12 , the weights of the pixels within the first recognition range in the first image are set to 255, and the weights of the pixels at other positions are set to 0.
[0230] Step 4: Determine whether the brightness of the image within the first recognition range falls within the reference brightness range.
[0231] Step 5: When the brightness of the image within the first recognition range falls within the reference brightness range, biometric feature recognition is performed on the image within the first recognition range.
[0232] In addition, when the brightness of the image within the first recognition range falls within the reference brightness range, it can also be determined that the biometric features in the image captured based on the default exposure parameters are clear enough. Subsequently, multiple images can be captured based on the default exposure parameters, and the recognition range can be determined from each image, and then biometric features can be recognized on the images within the recognition range in the multiple images.
[0233] Step 6. If the brightness of the image within the first recognition range does not fall within the reference brightness range, adjust the current exposure parameters, and use the adjusted exposure parameters to capture the next image. Then, according to the above process, determine the next recognition range from the next image, and judge whether the brightness of the image within the next recognition range falls within the reference brightness range, until the brightness of the image within the recognition range in the currently obtained image falls within the reference brightness range, and perform biometric recognition on the image within the currently obtained recognition range.
[0234] In addition, when the brightness of the image within the current recognition range falls within the reference brightness range, it can also be determined that the biometric features in the image captured based on the current exposure parameters are clear enough. Subsequently, multiple images can be captured based on the current exposure parameters, and the recognition range can be determined from each image, and then biometric feature recognition can be performed on the images within the recognition range in multiple images.
[0235] It should be noted that, based on the embodiment shown in FIG11 above, as shown in FIG13 , in the process of performing biometric recognition in response to a biometric recognition instruction, for images other than the first image, the optical flow method is adopted, and the position of the recognition range in the previous image can be used to determine the recognition range in the current image. This process is the same as steps 307-308 above and will not be repeated here.
[0236] Based on the embodiments shown in Figures 2 to 13 above, the embodiments of the present application also provide a flowchart of a biometric feature recognition method, as shown in Figure 14, the method includes: photographing the environment through the image sensor in the optical camera to obtain a first image; processing the first image through the image processing module, and obtaining the features of the processed first image through the feature extractor; processing the features of the processed first image through the channel compression layer, average pooling layer, maximum pooling layer, fully connected layer, etc. in the first network model to obtain automatic exposure control parameters; obtaining multi-scale histogram features of the first image, and determining the exposure parameters of the image sensor through the convolution layer and fully connected layer in the second network model in combination with the automatic exposure control parameters, and adjusting the exposure parameters of the image sensor based on the exposure parameters; repeating the above process until the clarity of the biometric features in the image captured by the current image sensor is sufficient. The environment is photographed through the current image sensor to obtain the next image, taking the j-th image as an example, where j is an integer greater than 1; the j-th image is processed through the image processing module; the features of the processed j-th image are obtained through the feature extractor; the features of the processed j-th image are subjected to biometric feature detection through the target detection model to obtain a recognition range, and the image within the recognition range in the j-th image contains the biometric feature.
[0237] Exemplarily, the image processing module is Software ISP (Software Image Signal Processing, image signal processing software).
[0238] In the embodiments of this application, automatic exposure automatically adjusts exposure parameters based on ambient light brightness to ensure that images are properly exposed under varying lighting conditions. Furthermore, an object detection model and algorithm are introduced to improve the accuracy of the photometry algorithm, ensuring sufficient clarity of biometric features in the resulting image, thereby ensuring accurate biometric recognition.
[0239] The biometric recognition method provided in the embodiments of the present application can be applied in a variety of scenarios, for example, in payment scenarios or card-punching scenarios.
[0240] Taking the clocking-in scenario as an example, when the clocking-in device detects that there are biometric features in the shooting area, the biometric features of the shooting area are collected based on the default exposure parameters to obtain an image containing the biometric features; according to the solution provided in the embodiment of the present application, an image with sufficiently high clarity and containing biometric features can be collected, and then the collected image can be compared with the pre-stored image to determine the object information that matches the collected image, and determine that the object indicated by the object information has completed the clocking-in.
[0241] Taking the payment scenario as an example, when paying for an order, if the scanning device detects that there are biometric features in the shooting area, the biometric features of the shooting area are collected based on the default exposure parameters to obtain an image containing the biometric features; according to the solution provided in the embodiment of the present application, an image with sufficiently high clarity and containing biometric features can be collected, and then the collected image can be compared with the pre-stored image to determine the object information that matches the collected image, and according to the number of resources to be paid for the order, the resources of that number are transferred from the account of the object information.
[0242] FIG15 is a schematic diagram of the structure of a biometric identification device provided in an embodiment of the present application. As shown in FIG15 , the device includes:
[0243] A determination module 1501 is configured to determine a first recognition range from a first image, where the image within the first recognition range contains a biometric feature and the first image is acquired based on a first exposure parameter;
[0244] An adjusting module 1502 is configured to adjust the first exposure parameter to obtain a second exposure parameter when the brightness of the image within the first recognition range does not fall within the reference brightness range;
[0245] An acquisition module 1503 is configured to acquire a second image based on a second exposure parameter, where the second image includes a biometric feature;
[0246] The determination module 1501 is further configured to determine a second recognition range from the second image, wherein the image within the second recognition range contains the biometric feature;
[0247] The recognition module 1504 is configured to recognize the object to which the biometric feature contained in the image within the second recognition range belongs when the brightness of the image within the second recognition range falls within the reference brightness range.
[0248] In one possible implementation, the determination module 1501 is used to perform multiple scale transformations on the features of the first image to obtain multiple first features, and the scales of the multiple first features are different; update each first feature separately to obtain a second feature corresponding to each first feature; process each second feature to obtain a fourth recognition range; and determine the first recognition range based on the obtained multiple fourth recognition ranges.
[0249] In another possible implementation, the determination module 1501 is used to divide the first image into blocks to obtain multiple image blocks; classify each image block to obtain the category to which each image block belongs; based on the categories to which the multiple image blocks belong, form a regional image from the image blocks belonging to a target category, where the target category indicates that the image block contains a biological feature; and perform multiple scale transformations on the features of the regional image to obtain multiple first features.
[0250] In another possible implementation, the determination module 1501 is used to determine the fourth recognition range with the highest confidence among multiple fourth recognition ranges as the first recognition range based on the confidence of each fourth recognition range, and the confidence of each fourth recognition range indicates the possibility that the image within each fourth recognition range contains biometric features.
[0251] In another possible implementation, as shown in FIG16 , the apparatus further includes:
[0252] An extraction module 1505 is configured to perform feature extraction on the first image and the second image respectively to obtain a third feature and a fourth feature, wherein the third feature indicates the first image and the fourth feature indicates the second image;
[0253] a processing module 1506 for processing the third feature and the fourth feature to obtain motion information, where the motion information indicates a change in position of the biometric feature in the second image relative to the first image;
[0254] An updating module 1507 is configured to update the motion information based on the third feature to obtain updated motion information;
[0255] The processing module 1506 is further configured to process the fourth feature and the updated motion information to obtain a second recognition range.
[0256] In another possible implementation, the determining module 1501 is configured to determine a third recognition range from the second image based on a position of the first recognition range in the first image, where the position of the third recognition range in the second image is the same as the position of the first recognition range in the first image;
[0257] The adjustment module 1502 is configured to adjust the position of the third recognition range in the second image to obtain a second recognition range.
[0258] In another possible implementation, the adjustment module 1502 is used to determine the probability corresponding to each pixel point within the third recognition range, where the probability corresponding to each pixel point is the probability that the image within the reference recognition range centered on each pixel point contains the biometric feature, and the size of the reference recognition range is the same as the size of the third recognition range; based on the probability corresponding to each pixel point within the third recognition range, the position of the third recognition range in the second image is adjusted to obtain the second recognition range.
[0259] In another possible implementation, the adjustment module 1502 is used to determine the target pixel point with the highest probability among the pixel points within the third recognition range; and adjust the position of the third recognition range in the second image to a position centered on the target pixel point to obtain the second recognition range.
[0260] In another possible implementation, the adjustment module 1502 is used to determine the adjustment distance and adjustment direction based on the position of the first key point in the first image and the position of the second key point in the second image, where the first key point and the second key point are the same key point of the biometric feature; based on the adjustment distance and adjustment direction, the position of the third recognition range in the second image is adjusted to obtain the second recognition range.
[0261] In another possible implementation, the determination module 1501 is used to perform key point detection on the first image to obtain multiple target key points in the first image; based on the relative position relationship between the multiple target key points and the biometric features and the positions of the multiple target key points in the first image, determine the first recognition range from the first image.
[0262] In another possible implementation, the adjustment module 1502 is further configured to adjust the second exposure parameter to obtain a third exposure parameter when the brightness of the image within the second recognition range does not fall within the reference brightness range;
[0263] The acquisition module 1503 is further configured to acquire a next image based on the third exposure parameter;
[0264] The recognition module 1504 is further configured to perform biometric recognition based on the next image.
[0265] In another possible implementation, the recognition module 1504 is further configured to recognize the object to which the biometric feature contained in the image within the first recognition range belongs when the brightness of the image within the first recognition range falls within a reference brightness range.
[0266] In another possible implementation, the adjustment module 1502 is configured to increase the first exposure parameter to obtain a second exposure parameter when the brightness of the image within the first recognition range is less than the minimum value in the reference brightness range; and to decrease the first exposure parameter to obtain a second exposure parameter when the brightness of the image within the first recognition range is greater than the maximum value in the reference brightness range.
[0267] It should be noted that the biometric recognition device provided in the above embodiment is merely an example of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the biometric recognition device provided in the above embodiment and the biometric recognition method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0268] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to enable the computer device to implement the operations performed by the biometric recognition method of the above embodiment.
[0269] Optionally, the computer device is provided as a terminal. FIG17 shows a block diagram of a terminal 1700 provided in an exemplary embodiment of the present application. The terminal 1700 includes: a processor 1701 and a memory 1702.
[0270] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0271] Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1702 is used to store at least one computer program, which is executed by processor 1701 to implement the biometric feature recognition method provided in the method embodiment of the present application.
[0272] In some embodiments, the terminal 1700 may optionally further include: a display screen 1705 , a camera assembly 1706 , and an optical sensor 1710 .
[0273] The display screen 1705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1705 is a touch screen display, the display screen 1705 also has the ability to collect touch signals on the surface or above the surface of the display screen 1705. The touch signal can be input as a control signal to the processor 1701 for processing. At this time, the display screen 1705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1705, which is set on the front panel of the terminal 1700; in other embodiments, there can be at least two display screens 1705, which are respectively set on different surfaces of the terminal 1700 or in a folding design; in other embodiments, the display screen 1705 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1700. Even more, the display screen 1705 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0274] The camera assembly 1706 is used to capture images or videos. Optionally, the camera assembly 1706 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0275] Optical sensor 1710 is used to detect ambient light intensity. In one embodiment, processor 1701 can control the display brightness of display screen 1705 based on the ambient light intensity detected by optical sensor 1710. Specifically, when the ambient light intensity is high, the display brightness of display screen 1705 is increased; when the ambient light intensity is low, the display brightness of display screen 1705 is decreased. In another embodiment, processor 1701 can also dynamically adjust the shooting parameters of camera assembly 1706 based on the ambient light intensity detected by optical sensor 1710.
[0276] Those skilled in the art will understand that the structure shown in FIG17 does not constitute a limitation on the terminal 1700 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0277] Optionally, the computer device is provided as a server. Figure 18 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1800 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1801 and one or more memories 1802, wherein the memory 1802 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1801 to implement the biometric feature recognition method provided by each of the above method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0278] An embodiment of the present application also provides a non-volatile computer-readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor to enable the computer to implement the operations performed by the biometric recognition method of the above embodiment.
[0279] An embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to enable a computer to implement the operations performed by the biometric recognition method of the above embodiment.
[0280] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0281] The above description is only an optional embodiment of the embodiment of the present application and is not intended to limit the embodiment of the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the embodiment of the present application should be included in the scope of protection of this application.
Claims
1. A biometric identification method, wherein: The method is executed by a computer device, and includes: determining a first recognition range from a first image, where the image within the first recognition range includes a biometric feature, and the first image is acquired based on a first exposure parameter; If the brightness of the image within the first recognition range does not fall within the reference brightness range, adjusting the first exposure parameter to obtain a second exposure parameter; capturing a second image based on the second exposure parameter, wherein the second image includes the biometric feature; determining a second recognition range from the second image, where the image within the second recognition range contains the biometric feature; When the brightness of the image within the second recognition range falls within the reference brightness range, the object to which the biometric feature contained in the image within the second recognition range belongs is recognized.
2. The method according to claim 1, wherein The determining the first recognition range from the first image includes: Performing multiple scale transformations on the features of the first image to obtain multiple first features, where the multiple first features have different scales; Update each first feature respectively to obtain a second feature corresponding to each first feature; processing each second feature to obtain a fourth recognition range; The first recognition range is determined based on the obtained multiple fourth recognition ranges.
3. The method according to claim 2, wherein: The performing multiple scale transformations on the features of the first image to obtain multiple first features includes: Dividing the first image into blocks to obtain a plurality of image blocks; Classify each image block to obtain the category to which each image block belongs; Based on the categories to which the plurality of image blocks belong, forming a regional image from the image blocks belonging to a target category, the target category indicating that the image blocks contain the biometric feature; Perform multiple scale transformations on the features of the region image to obtain the multiple first features.
4. The method according to claim 2 or 3, wherein: The determining the first identification range based on the obtained plurality of fourth identification ranges includes: Based on the confidence of each fourth recognition range, the fourth recognition range with the largest confidence among the multiple fourth recognition ranges is determined as the first recognition range, and the confidence of each fourth recognition range indicates the possibility that the image within each fourth recognition range contains the biometric feature.
5. The method according to any one of claims 1 to 4, wherein: The determining the second recognition range from the second image includes: Performing feature extraction on the first image and the second image respectively to obtain a third feature and a fourth feature, wherein the third feature indicates the first image and the fourth feature indicates the second image; processing the third feature and the fourth feature to obtain motion information, the motion information indicating a change in a position of the biometric feature in the second image relative to the first image; Based on the third feature, updating the motion information to obtain updated motion information; The fourth feature and the updated motion information are processed to obtain the second recognition range.
6. The method according to any one of claims 1 to 5, wherein: The determining the second recognition range from the second image includes: Based on the position of the first recognition range in the first image, a third recognition range is determined from the second image, wherein the position of the third recognition range in the second image is the same as the position of the first recognition range in the first image. same; The position of the third recognition range in the second image is adjusted to obtain the second recognition range.
7. The method according to claim 6, wherein: The adjusting the position of the third recognition range in the second image to obtain the second recognition range includes: For each pixel within the third recognition range, determining a probability corresponding to each pixel, where the probability corresponding to each pixel is a probability that an image within a reference recognition range centered on the pixel contains the biometric feature, where the size of the reference recognition range is the same as the size of the third recognition range; Based on the corresponding probabilities of the respective pixels within the third recognition range, the position of the third recognition range in the second image is adjusted to obtain the second recognition range.
8. The method according to claim 7, wherein: The adjusting the position of the third recognition range in the second image based on the probability corresponding to each pixel point within the third recognition range to obtain the second recognition range includes: Determine the target pixel with the highest probability among the pixels within the third recognition range; The position of the third recognition range in the second image is adjusted to a position centered on the target pixel point to obtain the second recognition range.
9. The method according to any one of claims 6 to 8, wherein: The adjusting the position of the third recognition range in the second image to obtain the second recognition range includes: determining an adjustment distance and an adjustment direction based on a position of a first key point in the first image and a position of a second key point in the second image, the first key point and the second key point being the same key point of the biometric feature; Based on the adjustment distance and the adjustment direction, the position of the third recognition range in the second image is adjusted to obtain the second recognition range.
10. The method according to any one of claims 1 to 9, wherein: The determining the first recognition range from the first image includes: Performing key point detection on the first image to obtain a plurality of target key points in the first image; The first recognition range is determined from the first image based on the relative positional relationship between the multiple target key points and the biometric features and the positions of the multiple target key points in the first image.
11. The method according to any one of claims 1 to 10, wherein: The method further comprises: If the brightness of the image within the second recognition range does not fall within the reference brightness range, adjusting the second exposure parameter to obtain a third exposure parameter; capturing a next image based on the third exposure parameter; Biometric recognition is performed based on the next image.
12. The method according to any one of claims 1 to 11, wherein: The method further comprises: When the brightness of the image within the first recognition range falls within the reference brightness range, the object to which the biometric feature contained in the image within the first recognition range belongs is recognized.
13. The method according to any one of claims 1 to 12, wherein: The adjusting the first exposure parameter to obtain the second exposure parameter includes: When the brightness of the image within the first recognition range is less than the minimum value in the reference brightness range, increasing the first exposure parameter to obtain the second exposure parameter; When the brightness of the image within the first recognition range is greater than the maximum value in the reference brightness range, the first exposure parameter is reduced to obtain the second exposure parameter.
14. A biometric identification device, wherein: The device comprises: A determination module, configured to determine a first recognition range from a first image, where the image within the first recognition range contains a biometric feature, and the first image is acquired based on a first exposure parameter; An adjusting module, configured to adjust the first exposure parameter to obtain a second exposure parameter when the brightness of the image within the first recognition range does not fall within a reference brightness range; an acquisition module, configured to acquire a second image based on the second exposure parameter, wherein the second image includes the biometric feature; The determining module is further configured to determine a second recognition range from the second image, wherein the image within the second recognition range contains the biometric feature; The recognition module is configured to recognize the object to which the biometric feature contained in the image within the second recognition range belongs when the brightness of the image within the second recognition range falls within the reference brightness range.
15. A computer device, wherein: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the computer device implements the operations performed by the biometric recognition method according to any one of claims 1 to 13.
16. A non-volatile computer-readable storage medium, wherein: The non-volatile computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement the operations performed by the biometric recognition method according to any one of claims 1 to 13.
17. A computer program product comprising a computer program, wherein The computer program is executed by a processor to enable the computer to implement the operations performed by the biometric recognition method according to any one of claims 1 to 13.