Resource Transfer Method, Apparatus, Device, and Medium

By detecting key points and filtering palm images on palm images, the problem of non-payers in palm swiping payment is solved, and the effect of reducing the cost of equipment is achieved.

CN116978070BActive Publication Date: 2025-07-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310754481.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2025-07-01
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

In the palm-brush payment scenario, non-payers are prone to mistaken brushing, resulting in an increase in the cost of equipment use.

Method used

By acquiring palm images, key point detection is performed to determine the palm direction and palm brushing angle, the target palm images within the preset palm brushing angle range are selected, and resource transfer processing is performed based on biological information.

Benefits of technology

It effectively avoids non-payers' mistakes and reduces the cost of using palm brushing equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116978070B_ABST
    Figure CN116978070B_ABST
Patent Text Reader

Abstract

The present application relates to a resource transfer method, apparatus, device, and medium. The method includes: obtaining at least one palm image collected by an image acquisition unit; for each palm image, performing key point detection on the palm image to obtain palm key points; determining the direction of the palm in the palm image according to the palm key points to obtain the palm direction; determining the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit; screening out the palm images whose swiping angles fall within a preset swiping angle range from the at least one palm image to obtain target palm images, and performing resource transfer processing based on the biological information in the target palm images. Using this method can reduce the usage cost of the palm swiping device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and in particular, to a resource transfer method, apparatus, device, and medium. Background Art

[0002] With the development of computer technology, palm-sweeping payment technology has emerged. With the wide application of palm-sweeping payment in daily life, it can provide people with more payment options and convenience, and people can complete the transfer of corresponding resources by swiping their palms. In the palm-sweeping payment scenario, the offline payment scenario environment is usually relatively complex. Without special settings, the palm-sweeping device usually supports people's palm-sweeping experience in all directions, and palm-sweeping can be successful in all directions, so there is also a risk of accidental swiping. For example, in offline palm-sweeping payment scenarios such as convenience stores and supermarkets, when the clerk signals the customer to swipe their palm, it is very easy to succeed in palm-sweeping, resulting in accidental swiping by the clerk.

[0003] In traditional technologies, physical baffles are usually added to the non-payment side of the palm-sweeping device to avoid accidental swiping by non-payers. However, currently, the method of adding physical baffles beside the palm-sweeping device to avoid accidental swiping increases the usage cost of the palm-sweeping device. Summary of the Invention

[0004] Based on this, it is necessary to provide a resource transfer method, apparatus, device, and medium that can reduce the usage cost of palm-sweeping devices for the above technical problems.

[0005] In a first aspect, this application provides a resource transfer method, the method comprising:

[0006] Obtain at least one palm image collected by an image acquisition unit;

[0007] For each palm image, perform key point detection on the palm image to obtain palm key points;

[0008] Determine the direction of the palm in the palm image according to the palm key points to obtain the palm direction;

[0009] Determine the palm-sweeping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit;

[0010] Screen the palm images whose palm-sweeping angles fall within a preset palm-sweeping angle range from the at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

[0011] In a second aspect, this application provides a resource transfer apparatus, the apparatus comprising:

[0012] An acquisition module, configured to acquire at least one palm image acquired by an image acquisition unit;

[0013] A detection module, configured to perform key point detection on each palm image to obtain palm key points;

[0014] A determination module, configured to determine the direction of the palm in the palm image according to the palm key points to obtain a palm direction; and determine the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit;

[0015] A screening module, configured to screen out palm images whose swiping angles fall within a preset swiping angle range from the at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

[0016] In one embodiment, the palm key points include a first key point and a second key point; the determination module is further configured to construct a first vector according to the first key point and the second key point, and use the direction of the first vector as the direction of the palm in the palm image to obtain a palm direction; take the starting point of the first vector as a new starting point, construct a second vector along the horizontal direction, and use the direction of the second vector as the image acquisition direction of the image acquisition unit; wherein, the starting point of the first vector is any one of the first key point and the second key point.

[0017] In one embodiment, the starting point of the first vector is the first key point; the determination module is further configured to, when the palm image is a left palm image, construct a second vector along a first horizontal direction with the first key point as a new starting point; when the palm image is a right palm image, construct a second vector along a second horizontal direction with the first key point as a new starting point; wherein, the first horizontal direction and the second horizontal direction are opposite horizontal directions.

[0018] In one embodiment, the determination module is further configured to, when the palm image is a left palm image, construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image with the first key point as a new starting point; when the palm image is a right palm image, construct a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image with the first key point as a new starting point.

[0019] In one embodiment, the first key point is a finger joint point located between the ring finger and the little finger of the palm in the palm image; the second key point is a finger joint point located between the index finger and the middle finger of the palm in the palm image.

[0020] In one embodiment, the obtaining module is further configured to obtain at least one initial image collected by an image acquisition unit; for each initial image, extract the image features of the initial image, and perform palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image; intercept the initial image based on the palm region box to obtain a palm image corresponding to the initial image.

[0021] In one embodiment, the palm region box is predicted by a trained palm detection model; the apparatus further includes:

[0022] A training module, configured to obtain a sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm; perform palm detection on the sample image through a palm detection model to be trained to obtain a predicted palm region box; determine a target loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box; train the palm detection model to be trained through the target loss value to obtain the trained palm detection model.

[0023] In one embodiment, the training module is further configured to obtain an initial sample image and divide the initial sample image into a plurality of image blocks; calibrate at least one reference palm region box for each image block in the initial sample image to obtain a sample image.

[0024] In one embodiment, the sample image further carries a reference confidence level of the reference palm region box; the training module is further configured to determine a first loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box; determine a predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; the region overlap degree is positively correlated with the predicted confidence level; determine a second loss value according to the confidence level difference between the predicted confidence level and the reference confidence level; determine a target loss value according to the first loss value and the second loss value.

[0025] In one embodiment, the training module is further configured to perform class probability prediction on the object in the predicted palm region box through the palm detection model to be trained to obtain a palm class probability that the object in the predicted palm region box belongs to a palm; determine a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box; determine a target loss value according to the first loss value, the second loss value, and the third loss value.

[0026] In one embodiment, the detection module is further configured to perform feature extraction on each palm image to obtain the image features of the palm image; and perform key point detection based on the image features of the palm image to obtain the palm key points corresponding to the palm image.

[0027] In one embodiment, the detection module is further configured to perform key point detection based on the image features of the palm image to obtain the initial key points corresponding to the palm image; for each initial key point, crop the palm image with reference to the initial key point to obtain a cropped image that covers the initial key point and meets a preset size; perform feature extraction on the cropped image to obtain the image features of the cropped image; and perform key point detection based on the image features of the cropped image to obtain the palm key points corresponding to the cropped image.

[0028] In a third aspect, the present application provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the method embodiments of the present application are implemented.

[0029] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the method embodiments of the present application are implemented.

[0030] In a fifth aspect, the present application provides a computer program product including a computer program, and when the computer program is executed by a processor, the steps in the method embodiments of the present application are implemented.

[0031] The above resource transfer method, device, equipment, medium and computer program product obtain at least one palm image collected by an image acquisition unit. For each palm image, key point detection is performed on the palm image to obtain palm key points. The direction of the palm in the palm image is determined according to the palm key points to obtain the palm direction, and the swiping angle of the palm in the palm image is determined according to the difference between the palm direction and the image acquisition direction of the image acquisition unit. Thus, palm images with swiping angles falling within a preset swiping angle range for characterizing the payee are automatically screened from at least one palm image to obtain the target palm image of the payee, and resource transfer processing is performed based on the biological information in the target palm image. Compared with the traditional method of adding a physical baffle next to the palm swiping device to avoid mis-swiping by non-payers at the physical level, the present application performs palm key point detection on the collected palm images, automatically determines the swiping angle of the palm based on the detected palm key points, and then screens out the target palm images for palm swiping payment from the collected palm images based on the swiping angle, so as to avoid mis-swiping by non-payers at the software level, thereby reducing the use cost of the palm swiping device. Description of the Drawings

[0032] Figure 1 It is an application environment diagram of the resource transfer method in an embodiment;

[0033] Figure 2 It is a schematic flowchart of the resource transfer method in an embodiment;

[0034] Figure 3 It is a schematic diagram of the palm key points detected from the palm image in an embodiment;

[0035] Figure 4 It is a schematic diagram of the non-paying party's accidental swiping in an embodiment;

[0036] Figure 5 It is a schematic diagram of screening the target palm image from each palm image in an embodiment;

[0037] Figure 6 It is a schematic diagram of the palm image acquisition and payment process in an embodiment;

[0038] Figure 7 It is a schematic diagram of the definition process of the image acquisition direction in an embodiment;

[0039] Figure 8 It is a schematic diagram of the palm direction and the image acquisition direction collected for the left hand in an embodiment;

[0040] Figure 9 It is a schematic diagram of the calculation process of the palm swiping angle collected for the left hand in an embodiment;

[0041] Figure 10 It is a schematic diagram of the calculation process of the palm swiping angle collected for the left hand in another embodiment;

[0042] Figure 11 It is a schematic diagram of the palm direction and the image acquisition direction collected for the right hand in an embodiment;

[0043] Figure 12 It is a schematic diagram of the calculation process of the palm swiping angle collected for the right hand in an embodiment;

[0044] Figure 13 It is a schematic diagram of the palm region box in an embodiment;

[0045] Figure 14 It is a schematic diagram of the palm image intercepted based on the palm region box in an embodiment;

[0046] Figure 15 It is a schematic diagram of the palm key points detected for the intercepted palm image in an embodiment;

[0047] Figure 16Schematic flowchart of the resource transfer method in another embodiment;

[0048] Figure 17 Structural block diagram of the resource transfer device in one embodiment;

[0049] Figure 18 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners

[0050] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] The resource transfer method provided by the present application can be applied to the application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can be set separately and can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or on other servers. Among them, the terminal 102 can be, but is not limited to, a palm-sweeping device, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides network security services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, cloud security, host security, etc., CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication methods, and the present application does not limit this here.

[0052] The terminal 102 can obtain at least one palm image collected by the image acquisition unit. For each palm image, the terminal 102 can perform key point detection on the palm image to obtain palm key points. The terminal 102 can determine the direction of the palm in the palm image according to the palm key points to obtain the palm direction, and determine the palm-sweeping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit. Furthermore, the terminal 102 can screen out the palm images whose palm-sweeping angles fall within the preset palm-sweeping angle range from the at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

[0053] It can be understood that the terminal 102 can collect palm images through an image acquisition unit deployed on the terminal. It can also be understood that the palm images pre-collected through the image acquisition unit are stored in the server 104, and the terminal 102 can also obtain palm images from the server. This embodiment does not make any limitations in this regard. It can be understood that Figure 1 The application scenarios in are only for illustrative purposes and are not limited thereto.

[0054] It should be noted that the resource transfer methods in some embodiments of this application use artificial intelligence technology. For example, the palm key points in this application are detected using artificial intelligence technology. To better understand artificial intelligence, the concept of artificial intelligence will be described as follows. Specifically, artificial intelligence uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain the best results in theory, methods, technologies, and application systems. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable machines to have the functions of perception, reasoning, and decision-making. This application realizes key point detection for palm images based on artificial intelligence technology, which can improve the accuracy of key point detection.

[0055] In one embodiment, as Figure 2 shown, a resource transfer method is provided. In this embodiment, this method is applied to Figure 1 the terminal 102 in as an example for description, including the following steps:

[0056] Step 202, obtain at least one palm image collected by the image acquisition unit.

[0057] Among them, the image acquisition unit is a hardware unit for collecting images. A palm image is an image including a palm.

[0058] In one embodiment, the image acquisition unit is deployed on the terminal. When an object places a palm above the image acquisition unit, the terminal can collect an image of the palm through the image acquisition unit and directly use the collected image as a palm image.

[0059] In one embodiment, the terminal includes a palm-sweeping device, and the image acquisition unit includes a camera. When an object places a palm above the camera of the palm-sweeping device, the terminal can collect an image of the palm through the camera to obtain a palm image.

[0060] Step 204, for each palm image, perform key point detection on the palm image to obtain palm key points.

[0061] Among them, the palm key points are located at positions on the palm in the palm image that do not change with the posture of the palm. It can be understood that the positions of the palm key points on the palm are fixed. For example, the positions of the palm key points on the palm when each finger of the palm is in an open state are the same as the positions of the palm key points on the palm when each finger of the palm is in a closed state.

[0062] In one embodiment, the number of detected palm key points can include at least two. As Figure 3 shown, after the terminal obtains the palm image collected by the image acquisition unit, it can perform key point detection on the palm image to obtain the palm key points of the palm in the palm image, that is, palm key point 1, palm key point 2, palm key point 3, and palm key point 4.

[0063] In one embodiment, for each palm image, the terminal can input the palm image into a trained palm key point detection model to perform key point detection on the palm image through the palm key point detection model, and output the palm key points of the palm in the palm image.

[0064] In one embodiment, the trained palm key point detection model can be obtained through the following method: The terminal can obtain training images including the palm, where the training images carry reference palm key points calibrated for the palm. The terminal can perform key point detection on the training images through the palm key point detection model to be trained to obtain predicted palm key points, and determine the loss value according to the position difference between the predicted palm key points and the reference palm key points. Furthermore, the terminal can train the palm key point detection model to be trained through the loss value to obtain the trained palm key point detection model.

[0065] Step 206, determine the direction of the palm in the palm image according to the palm key points to obtain the palm direction.

[0066] Among them, the palm direction is the direction in which the palm is located relative to the image acquisition unit when the image acquisition unit performs image acquisition on the palm.

[0067] Specifically, the number of detected palm key points can include at least two. The terminal can determine the direction of the palm in the palm image according to the at least two detected palm key points to obtain the palm direction.

[0068] In one embodiment, the terminal can construct a vector according to the at least two detected palm key points and use the direction of the constructed vector as the direction of the palm in the palm image to obtain the palm direction.

[0069] In one embodiment, the terminal may randomly select two palm key points from the detected palm key points, and construct a vector based on the two selected palm key points. Furthermore, the terminal may use the direction of the constructed vector as the direction of the palm in the palm image to obtain the palm direction.

[0070] In one embodiment, the terminal may randomly select two palm key points from the detected palm key points, and use the two selected palm key points as the starting point and the ending point of the vector respectively to construct a vector. Furthermore, the terminal may use the direction of the constructed vector as the direction of the palm in the palm image to obtain the palm direction.

[0071] Step 208: Determine the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit.

[0072] Wherein, the image acquisition direction is the direction predefined for the image acquisition unit. The swiping angle is the direction angle between the palm direction of the palm in the palm image and the image acquisition direction of the image acquisition unit.

[0073] In one embodiment, the terminal may determine the direction angle between the palm direction and the image acquisition direction according to the difference between the palm direction and the image acquisition direction of the image acquisition unit, and use the direction angle as the swiping angle of the palm in the palm image.

[0074] In one embodiment, the terminal may construct a vector along the palm direction and construct a vector along the image acquisition direction of the image acquisition unit. Furthermore, the terminal may determine the direction angle between the palm direction and the image acquisition direction according to the vector constructed along the palm direction and the vector constructed along the image acquisition direction, and use the direction angle as the swiping angle of the palm in the palm image.

[0075] Step 210: Screen the palm images whose swiping angles fall within a preset swiping angle range from at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

[0076] In one embodiment, the terminal may screen the palm images whose swiping angles fall within a preset swiping angle range from at least one collected palm image. It can be understood that the number of the screened palm images may be at least one. The terminal may randomly select one palm image from the screened palm images as the target palm image. Furthermore, the terminal may obtain the biological information of the palm in the target palm image and perform resource transfer processing based on the biological information in the target palm image.

[0077] In one embodiment, the terminal can preliminarily screen the palm images whose palm brushing angles fall within a preset palm brushing angle range from at least one collected palm image. It can be understood that the number of screened palm images can be at least one. The terminal can perform image quality detection on each preliminarily screened palm image and use the palm image with the best quality as the target palm image. It can be understood that the image quality detection can detect at least one of the integrity and clarity of the palm.

[0078] In one embodiment, as Figure 4 shown, in the palm brushing payment scenario, the terminal includes a palm brushing device 401. When a non-paying party 402 (such as a supermarket cashier) uses their palm to signal a paying party (such as a supermarket customer) to perform palm brushing payment, the palm brushing device may collect the palm image of the non-paying party 402, resulting in the situation of accidental brushing by the non-paying party. The preset palm brushing angle range of this application can be defined as the range of palm brushing angles corresponding to the palm images collected for the party to be paid. In the embodiments of this application, the target palm image collected for the paying party is screened out from the collected palm images through the palm brushing angle, so as to avoid accidental brushing by the non-paying party at the software level, thereby reducing the usage cost of the palm brushing device.

[0079] In one embodiment, in the palm brushing payment scenario, the terminal includes a palm brushing device. As Figure 5 shown, the palm brushing device can screen the palm images whose palm brushing angles fall within a preset palm brushing angle range from the collected palm images (that is, the eight palm images 401-408). For example, the palm brushing angles corresponding to the five palm images 401-405 fall within the preset palm brushing angle range of 0-90°. The palm brushing device can randomly select one palm image from the five screened palm images as the target palm image (for example, 403 is the target palm image). Furthermore, the palm brushing device can obtain the biological information of the palm in the target palm image 403 and perform resource transfer processing based on the biological information.

[0080] In one embodiment, in the palm brushing payment scenario, the terminal includes a palm brushing device. As Figure 6 shown, in the image collection stage, after the initiator (such as a supermarket cashier) initiates resource collection, the palm brushing device can collect images of the palm above the palm brushing device to obtain at least one palm image. Furthermore, the palm brushing device can screen out the target palm image from the at least one palm image. In the payment stage, the palm brushing device can read the biological information of the palm in the target palm image and perform resource payment processing based on the biological information in the target palm image.

[0081] In one embodiment, the biometric information in the target palm image includes palmprint information. It can be understood that the terminal can recognize the palmprint information in the target palm image and perform resource transfer processing based on the palmprint information in the target palm image.

[0082] In the above resource transfer method, by acquiring at least one palm image collected by the image acquisition unit, for each palm image, key points of the palm image are detected to obtain palm key points. The direction of the palm in the palm image is determined according to the palm key points to obtain the palm direction, and the swiping angle of the palm in the palm image is determined according to the difference between the palm direction and the image acquisition direction of the image acquisition unit. Thus, a palm image with a swiping angle falling within a preset swiping angle range for characterizing the payee is automatically screened from at least one palm image to obtain the target palm image of the payee, and resource transfer processing is performed based on the biometric information in the target palm image. Compared with the traditional method of adding a physical baffle beside the swiping device to avoid mis-swiping by non-paying parties at the physical level, in this application, key points of the collected palm image are detected, and the swiping angle of the palm is automatically judged based on the detected palm key points. Furthermore, the target palm image for swiping payment is screened from the collected palm images based on the swiping angle, so as to avoid mis-swiping by non-paying parties at the software level, thereby reducing the usage cost of the swiping device.

[0083] In one embodiment, the palm key points include a first key point and a second key point; determining the direction of the palm in the palm image according to the palm key points to obtain the palm direction includes: constructing a first vector according to the first key point and the second key point, and taking the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction; the method further includes: taking the starting point of the first vector as a new starting point, constructing a second vector along the horizontal direction, and taking the direction of the second vector as the image acquisition direction of the image acquisition unit; wherein, the starting point of the first vector is any one of the first key point and the second key point.

[0084] Wherein, the first vector is a vector constructed based on the first key point and the second key point. The second vector is a vector constructed based on the first vector and the horizontal direction.

[0085] Specifically, the terminal can take any one of the first key point and the second key point as the starting point of the first vector, and construct the first vector according to the first key point and the second key point. It can be understood that the first vector passes through the first key point and the second key point. The terminal can take the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction. Furthermore, the terminal can take the starting point of the first vector as a new starting point, construct a second vector along the horizontal direction, and take the direction of the second vector as the image acquisition direction of the image acquisition unit.

[0086] In one embodiment, the terminal may use either the first key point or the second key point as the starting point of the first vector, and use the key point that is not used as the starting point of the first vector among the first key point and the second key point as the ending point of the first vector to construct the first vector. It can be understood that the modulus of the first vector is the length of the line segment between the first key point and the second key point. For example, if the terminal uses the first key point as the starting point of the first vector, it may use the second key point as the ending point of the first vector to construct the first vector. If the terminal uses the second key point as the starting point of the first vector, it may use the first key point as the ending point of the first vector to construct the first vector.

[0087] In one embodiment, the terminal may use either the first key point or the second key point as the starting point of the first vector, and use the key point that is not used as the starting point of the first vector among the first key point and the second key point as the point that the first vector passes through to construct the first vector. It can be understood that the modulus of the first vector is greater than the length of the line segment between the first key point and the second key point.

[0088] In one embodiment, the terminal may use either the first key point or the second key point as the starting point of the first vector, and use the direction in which the key point that is not used as the starting point of the first vector among the first key point and the second key point is located as the direction of the first vector to construct the first vector. It can be understood that the first vector does not pass through the second key point, and the modulus of the first vector is less than the length of the line segment between the first key point and the second key point.

[0089] In one embodiment, as Figure 7 shown in part (a), by placing the scissors 702 directly above the image acquisition unit of the terminal 701, the horizontal direction in this application can be defined as the direction shown in Figure 7 part (b). It can be understood that the direction perpendicular to the horizontal direction is the vertical direction.

[0090] In the above embodiments, by constructing the first vector through two palm key points and using the direction of the first vector as the palm direction of the palm in the palm image, the accuracy of obtaining the palm direction can be improved. Furthermore, by using the starting point of the first vector as the new starting point and constructing the second vector along the horizontal direction and using the direction of the second vector as the image acquisition direction of the image acquisition unit, the accuracy of obtaining the image acquisition direction can be improved. Furthermore, by determining the swiping angle of the palm in the palm image based on the more accurate palm direction and image acquisition direction, the accuracy of the swiping angle can be further improved.

[0091] In one embodiment, the starting point of the first vector is the first key point; taking the starting point of the first vector as the new starting point, a second vector is constructed along the horizontal direction, including: when the palm image is a left palm image, taking the first key point as the new starting point, a second vector is constructed along the first horizontal direction; when the palm image is a right palm image, taking the first key point as the new starting point, a second vector is constructed along the second horizontal direction; wherein, the first horizontal direction and the second horizontal direction are opposite horizontal directions.

[0092] Wherein, the above-mentioned horizontal direction includes the first horizontal direction and the second horizontal direction, and the first horizontal direction is opposite to the second horizontal direction. The left palm image is a palm image obtained by the image acquisition unit for the left hand of the object. The right palm image is a palm image obtained by the image acquisition unit for the right hand of the object.

[0093] Specifically, the terminal can use the first key point as the starting point of the first vector. When the palm image is a left palm image obtained by collecting for the left hand of the object, the terminal can use the first key point (i.e., the starting point of the first vector) as the new starting point and construct a second vector along the first horizontal direction. When the palm image is a right palm image obtained by collecting for the right hand of the object, taking the first key point (i.e., the starting point of the first vector) as the new starting point, a second vector is constructed along the second horizontal direction. It can be understood that the first vector and the second vector have a common starting point, that is, the starting points of the first vector and the second vector are both the first key point.

[0094] In the above embodiment, when the palm image is obtained by collecting for the left hand of the object, by taking the first key point as the new starting point and constructing a second vector along the first horizontal direction, the construction accuracy of the second vector can be improved when the palm image is obtained by collecting for the left hand of the object. When the palm image is obtained by collecting for the right hand of the object, by taking the first key point as the new starting point and constructing a second vector along the second horizontal direction, the construction accuracy of the second vector can be improved when the palm image is obtained by collecting for the right hand of the object, so that based on a more accurate second vector to determine the image acquisition direction, the accuracy of the image acquisition direction can be improved.

[0095] In one embodiment, when the palm image is a left palm image, a second vector is constructed along the first horizontal direction with the first key point as the new starting point, including: when the palm image is a left palm image, a second vector is constructed along the positive direction of the horizontal axis of the image coordinate system of the left palm image with the first key point as the new starting point; when the palm image is a right palm image, a second vector is constructed along the second horizontal direction with the first key point as the new starting point, including: when the palm image is a right palm image, a second vector is constructed along the negative direction of the horizontal axis of the image coordinate system of the right palm image with the first key point as the new starting point.

[0096] Wherein, the image coordinate system is a coordinate system established based on the palm image. The above-mentioned first horizontal direction includes the positive direction of the horizontal axis of the image coordinate system, and the above-mentioned second horizontal direction includes the negative direction of the horizontal axis of the image coordinate system.

[0097] Specifically, when the palm image is a left palm image collected for the left hand of the object, the terminal can use the first key point (i.e., the starting point of the first vector) as the new starting point and construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image. When the palm image is a right palm image collected for the right hand of the object, the terminal can use the first key point (i.e., the starting point of the first vector) as the new starting point and construct a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image.

[0098] In the above embodiment, when the palm image is a left palm image, constructing a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image with the first key point as the new starting point can improve the construction accuracy of the second vector for the left palm image. When the palm image is a right palm image, constructing a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image with the first key point as the new starting point can improve the construction accuracy of the second vector for the right palm image.

[0099] In one embodiment, the first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

[0100] In one embodiment, as Figure 8 shown, when the palm image is a left palm image collected for the left hand of the object (it can be understood that after mirroring during the collection process, the left palm image is as Figure 8 shown), the terminal can use the first key point (i.e., Figure 8 the key point 3 in) as the starting point of the first vector, and use the second key point (i.e., Figure 8Key points: 1) As the end point of the first vector, construct the first vector. The terminal can use the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction. Furthermore, the terminal can use key point 3 as the new starting point and construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image. It can be understood that the direction of the second vector is the positive direction of the horizontal axis, that is, the image acquisition direction.

[0101] In one embodiment, when the object uses the left hand for forward palm swiping, as Figure 9 shown, when the palm image is a left palm image collected for the object's left hand (it can be understood that after mirroring during the collection process, the left palm image is as shown in part (a) of Figure 9 ), referring to part (b) of Figure 9 , the terminal can determine the palm swiping angle θ of the palm in the left palm image according to the difference between the palm direction (i.e., the direction of the first vector) and the image acquisition direction for the left palm image (i.e., the direction of the second vector).

[0102] In one embodiment, when the object uses the left hand for non - forward palm swiping, as Figure 10 shown, when the palm image is a left palm image collected for the object's left hand (it can be understood that after mirroring during the collection process, the left palm image is as shown in part (a) of Figure 10 ), referring to part (b) of Figure 10 , the terminal can determine the palm swiping angle θ of the palm in the left palm image according to the difference between the palm direction (i.e., the direction of the first vector) and the image acquisition direction for the left palm image (i.e., the direction of the second vector). It can be understood that the swiping angle calculated when the object uses the right hand for forward palm swiping is smaller than the swiping angle calculated when the object uses the right hand for non - forward palm swiping.

[0103] In one embodiment, as Figure 11 shown, when the palm image is a right palm image collected for the object's right hand (it can be understood that after mirroring during the collection process, the right palm image is as shown in Figure 11 ), the terminal can use the first key point (i.e., key point 3 in Figure 11 ) as the starting point of the first vector and the second key point (i.e., key point 1 in Figure 11 ) as the end point of the first vector to construct the first vector. The terminal can use the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction. Furthermore, the terminal can use key point 3 as the new starting point and construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the right palm image. It can be understood that the direction of the second vector is the negative direction of the horizontal axis, that is, the image acquisition direction.

[0104] In one embodiment, when the object uses the right hand for forward palm swiping, asFigure 12 As shown, when the palm image is a right palm image collected for the right hand of the object (it can be understood that after mirroring during the collection process, the right palm image is as shown in part (a) of Figure 12 ), referring to part (b) of Figure 12 , the terminal can determine the swiping angle θ of the palm in the right palm image based on the difference between the palm direction (i.e., the direction of the first vector) and the image collection direction of the right palm image (i.e., the direction of the second vector).

[0105] In one embodiment, when the object uses the right hand for non - forward swiping, when the palm image is a right palm image collected for the right hand of the object, the terminal can determine the swiping angle of the palm in the right palm image based on the difference between the palm direction (i.e., the direction of the first vector) and the image collection direction of the right palm image (i.e., the direction of the second vector). It can be understood that the swiping angle calculated when the object uses the right hand for forward swiping is smaller than the swiping angle calculated when the object uses the right hand for non - forward swiping.

[0106] In the above - mentioned embodiment, the finger - gap point between the ring finger and the little finger of the palm in the palm image is used as the first key point, and the finger - gap point between the index finger and the middle finger of the palm in the palm image is used as the second key point. In this way, since the positions of the first key point and the second key point in the palm are far apart, the situation of key - point overlap can be avoided, and thus the first vector can be constructed based on the first key point and the second key point, which can improve the construction accuracy of the first vector.

[0107] In one embodiment, obtaining at least one palm image collected by the image acquisition unit includes: obtaining at least one initial image collected by the image acquisition unit; for each initial image, extracting the image features of the initial image and performing palm detection based on the image features of the initial image to obtain a palm - region box corresponding to the initial image; the palm - region box is used to locate the region where the palm is located in the initial image; and intercepting the initial image based on the palm - region box to obtain a palm image corresponding to the initial image.

[0108] Specifically, the terminal can obtain at least one initial image collected by the image acquisition unit. It can be understood that the initial image may or may not include a palm. For each initial image, the terminal can extract features from the initial image to obtain the image features of the initial image, and perform palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image, where the detected palm region box is used to locate the region where the palm is located in the initial image. Furthermore, the terminal can intercept the initial image based on the palm region box to obtain a palm image corresponding to the initial image and including the palm. It can be understood that if there is a palm in the initial image, the terminal can detect a palm region box for locating the region where the palm is located in the initial image, and intercept a palm image including the palm from the initial image based on the palm region box. If there is no palm in the initial image, the terminal cannot detect a palm region box from the initial image.

[0109] In one embodiment, the terminal can input each initial image into a trained palm detection model respectively. For each initial image, the terminal can extract features from the initial image through the trained palm detection model to obtain the image features of the initial image, and perform palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image.

[0110] In one embodiment, as Figure 13 shown, the region box information of the palm region box detected from the initial image includes the position information of the palm region box, that is, the coordinates (x, y) of the palm region box in the initial image. The region box information of the palm region box also includes the width w and height h of the palm region box. Furthermore, as Figure 14 shown, the terminal can intercept the initial image based on the palm region box to obtain a palm image corresponding to the initial image and including the palm.

[0111] In the above embodiment, by obtaining at least one initial image collected by the image acquisition unit; for each initial image, detecting the palm region box corresponding to the initial image, and intercepting the initial image based on the palm region box to obtain the palm image corresponding to the initial image. Furthermore, performing key point detection based on the intercepted palm image can improve the accuracy of key point detection.

[0112] In one embodiment, the palm region box is predicted by a trained palm detection model; the method further includes: obtaining a sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm; performing palm detection on the sample image through the palm detection model to be trained to obtain a predicted palm region box; determining a target loss value according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box; training the palm detection model to be trained with the target loss value to obtain a trained palm detection model.

[0113] Wherein, the reference palm region box is a palm region box used as a reference during the training of the palm detection model to be trained. The predicted palm region box is a palm region box obtained by performing palm detection on the sample image through the palm detection model to be trained during the training process. The position difference is the difference between the position of the predicted palm region box in the sample image and the position of the reference palm region box in the sample image. The position difference includes the difference between the abscissa of the predicted palm region box in the sample image and the abscissa of the reference palm region box in the sample image, and the difference between the ordinate of the predicted palm region box in the sample image and the ordinate of the reference palm region box in the sample image. The width-height difference includes a width difference and a height difference. The width difference is the difference between the width of the predicted palm region box and the width of the reference palm region box. The height difference is the difference between the height of the predicted palm region box and the height of the reference palm region box. It can be understood that the target loss value in this embodiment takes into account both the position difference between the predicted palm region box and the reference palm region box and the width-height difference between the predicted palm region box and the reference palm region box.

[0114] Specifically, the terminal can obtain a sample image including a sample palm, and the sample image carries a reference palm region box pre-calibrated for the sample palm. The terminal can input the sample image into the palm detection model to be trained to perform palm detection on the sample image through the palm detection model to be trained and output a predicted palm region box corresponding to the sample image. It can be understood that the predicted palm region box is used to locate the region where the sample palm is located in the sample image. The terminal can determine the target loss value according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box, and perform iterative training on the palm detection model to be trained in the direction of reducing the target loss value until the iteration stop condition is met, to obtain a trained palm detection model.

[0115] In one embodiment, the iteration stop condition can be at least one of the iteration times reaching a preset iteration times or the target loss value being less than a preset loss value.

[0116] In one embodiment, the terminal can obtain an initial sample image including at least one sample palm. For each sample palm in the initial sample image, a reference palm region box is calibrated for the sample palm to obtain a sample image.

[0117] In one embodiment, the terminal can perform weighted processing on the position difference and the width-height difference between the predicted palm region box and the reference palm region box, and directly use the weighted result as the target loss value.

[0118] In the above embodiment, the palm detection model to be trained is used to detect the palm in the sample image to obtain a predicted palm region box, and the target loss value is determined according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box in the sample image. Furthermore, the palm detection model to be trained is trained through the target loss value to obtain a trained palm detection model, which can improve the key point detection accuracy of the trained palm detection model.

[0119] In one embodiment, obtaining a sample image includes: obtaining an initial sample image and dividing the initial sample image into multiple image blocks; calibrating at least one reference palm region box for each image block in the initial sample image to obtain a sample image.

[0120] Specifically, the terminal can obtain at least one initial sample image. For each initial sample image, the terminal can perform image division on the initial sample image to obtain multiple image blocks corresponding to the initial sample image. Furthermore, the terminal can calibrate at least one reference palm region box for each image block in the initial sample image to obtain a sample image corresponding to the initial sample image.

[0121] In the above embodiment, by dividing the initial sample image into multiple image blocks and calibrating at least one reference palm region box for each image block in the initial sample image, a sample image is obtained. Since the sample image will be calibrated with multiple reference palm region boxes, the information for reference can be increased without changing the number of sample images. Therefore, by using the sample image to train the palm detection model to be trained to obtain a trained palm detection model, the key point detection accuracy of the trained palm detection model can be improved.

[0122] In one embodiment, the sample image also carries a reference confidence level of the reference palm region box; determining a target loss value according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box, including: determining a first loss value according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box; determining a predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; the region overlap degree is positively correlated with the predicted confidence level; determining a second loss value according to the confidence level difference between the predicted confidence level and the reference confidence level; determining the target loss value according to the first loss value and the second loss value.

[0123] Wherein, the region overlap degree is the overlap degree between the region corresponding to the predicted palm region box and the region corresponding to the reference palm region box. The region overlap degree is positively correlated with the predicted confidence level, that is, the higher the region overlap degree, the higher the predicted confidence level, and the lower the region overlap degree, the lower the predicted confidence level. The reference confidence level is the confidence level of the reference palm region box used as a reference during the training of the palm detection model to be trained. The predicted confidence level is the confidence level of the predicted palm region box obtained by performing palm detection on the sample image through the palm detection model to be trained. The first loss value is a loss value determined based on the position difference and the width-height difference between the predicted palm region box and the reference palm region box. The second loss value is a loss value determined based on the confidence level difference between the predicted confidence level and the reference confidence level. It can be understood that the target loss value in this embodiment takes into account both the first loss value and the second loss value.

[0124] In one embodiment, when there is a sample palm in the predicted palm region box, the terminal can determine the predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box. When there is no sample palm in the predicted palm region box, the predicted confidence level of the predicted palm region box is determined to be zero.

[0125] In one embodiment, the region overlap degree may include the intersection-over-union (IoU) between the region corresponding to the predicted palm region box and the region corresponding to the reference palm region box. It can be understood that the intersection-over-union is the ratio between the region intersection and the region union. Wherein, the region intersection is the intersection between the region corresponding to the predicted palm region box and the region corresponding to the reference palm region box. The region union is the union between the region corresponding to the predicted palm region box and the region corresponding to the reference palm region box. The terminal can determine the predicted confidence level of the predicted palm region box according to the intersection-over-union between the predicted palm region box and the reference palm region box. Among them, the intersection-over-union is positively correlated with the predicted confidence level.

[0126] In one embodiment, the terminal may perform a weighted process based on the first loss value and the second loss value, and directly use the weighted result as the target loss value.

[0127] In the above embodiment, by predicting the position difference and the width-height difference between the predicted palm region box and the reference palm region box, the first loss value is determined, and according to the confidence difference between the predicted confidence and the reference confidence, the second loss value is determined. Furthermore, based on the first loss value and the second loss value, a richer target loss value is determined. Then, by using the target loss value to train the palm detection model to be trained, a trained palm detection model is obtained, which can further improve the key point detection accuracy of the trained palm detection model.

[0128] In one embodiment, determining the target loss value according to the first loss value and the second loss value includes: performing a class probability prediction on the object in the predicted palm region box through the palm detection model to be trained, and obtaining the palm class probability that the object in the predicted palm region box belongs to a palm; determining a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box; determining the target loss value according to the first loss value, the second loss value, and the third loss value.

[0129] Among them, the third loss value is a loss value determined based on the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box. It can be understood that the target loss value in this embodiment takes into account the first loss value, the second loss value, and the third loss value at the same time.

[0130] Specifically, the object in the predicted palm region box may be a palm or may not be a palm. The terminal can perform a class probability prediction on the object in the predicted palm region box through the palm detection model to be trained, and obtain the palm class probability that the object in the predicted palm region box belongs to a palm. Then, the terminal can determine the third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box, and determine the target loss value according to the first loss value, the second loss value, and the third loss value.

[0131] In one embodiment, the terminal may perform a weighted process on the first loss value, the second loss value, and the third loss value, and directly use the weighted result as the target loss value.

[0132] In one embodiment, the target loss value can be calculated through the following loss function:

[0133]

[0134] Among them, L is the target loss value, s 2is the number of image patches in the sample image, and B is the number of reference palm region boxes calibrated for each image patch. ij represents the j-th reference palm region box of the i-th image patch. obj indicates that there is a sample palm in the reference palm region box, and noobj indicates that there is no sample palm in the reference palm region box. x i represents the abscissa of the reference palm region box in the sample image, and y i represents the ordinate of the reference palm region box in the sample image. represents the abscissa of the predicted palm region box in the sample image, represents the ordinate of the predicted palm region box in the sample image. represents the difference between the abscissa of the predicted palm region box in the sample image and the abscissa of the reference palm region box in the sample image, represents the difference between the ordinate of the predicted palm region box in the sample image and the ordinate of the reference palm region box in the sample image, represents the difference between the position of the predicted palm region box in the sample image and the position of the reference palm region box in the sample image. w i represents the width of the reference palm region box, and h i represents the height of the reference palm region box. represents the width of the predicted palm region box, represents the height of the predicted palm region box. represents the width difference between the width of the predicted palm region box and the width of the reference palm region box. represents the height difference between the height of the predicted palm region box and the height of the reference palm region box. C i represents the reference confidence of the reference palm region box, the predicted confidence of the predicted palm region box. The confidence difference between the predicted confidence and the reference confidence. c ∈ classes represents the class to which the object in the palm region box belongs. It can be understood that the classes to which the objects belong in this application include the palm class. If c is the palm class, then p i (c) represents the palm class probability of the sample palm in the reference palm region box, represents the palm class probability that the object in the predicted palm region box belongs to the palm. represents the difference between the palm class probability and the palm class probability of the sample palm in the reference palm region box. λ1, λ2, and λ3 are preset constants.

[0135] In the above embodiments, the third loss value is determined based on the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box. Then, based on the first loss value, the second loss value, and the third loss value, a more comprehensive target loss value is determined. Subsequently, the target loss value is used to train the palm detection model to be trained, and the trained palm detection model is obtained, which can further improve the key point detection accuracy of the trained palm detection model.

[0136] In one embodiment, for each palm image, key point detection is performed on the palm image to obtain palm key points, including: for each palm image, feature extraction is performed on the palm image to obtain the image features of the palm image; based on the image features of the palm image, key point detection is performed to obtain the palm key points corresponding to the palm image.

[0137] Specifically, for each palm image, the terminal can perform convolution processing on the palm image to extract the image features of the palm image from the palm image. Then, the terminal can perform key point detection based on the image features of the palm image to obtain the palm key points corresponding to the palm image.

[0138] In one embodiment, for each palm image, the terminal can input the palm image into the trained palm key point detection model to extract the image features of the palm image through the palm key point detection model. Then, the terminal can perform key point detection based on the image features of the palm image to obtain the palm key points corresponding to the palm image.

[0139] In one embodiment, the number of detected palm key points can include at least two. For example Figure 15 As shown, after the terminal obtains the palm image intercepted from the initial image, key point detection can be performed on the intercepted palm image to obtain the palm key points of the palm in the intercepted palm image, that is, palm key point 1, palm key point 2, palm key point 3, and palm key point 4.

[0140] In the above embodiments, by extracting the image features of the palm image, since the image features of the palm image can be used to represent the rich feature information of the palm in the palm image, key point detection is performed based on the image features of the palm image to obtain the palm key points corresponding to the palm image, which can improve the key point detection accuracy.

[0141] In one embodiment, key point detection is performed according to the image features of the palm image to obtain the palm key points corresponding to the palm image, including: performing key point detection according to the image features of the palm image to obtain the initial key points corresponding to the palm image; for each initial key point, cropping the palm image with reference to the initial key point to obtain a cropped image that covers the initial key point and meets the preset size; extracting the image features of the cropped image to obtain the image features of the cropped image; and performing key point detection according to the image features of the cropped image to obtain the palm key points corresponding to the cropped image.

[0142] It can be understood that the initial key points are the palm key points obtained by performing preliminary key point detection on the palm image. The initial key points may not be very accurate. To obtain more accurate palm key points, the palm image can be cropped with reference to the initial key point to obtain a cropped image that covers the initial key point and meets the preset size, and advanced key point detection can be performed based on the cropped image to obtain palm key points with higher accuracy than the initial key points.

[0143] Specifically, the terminal can perform initial key point detection according to the image features of the palm image to obtain the initial key points corresponding to the palm image. For each initial key point, the terminal can crop the palm image with reference to the initial key point according to the preset size to obtain a cropped image that covers the initial key point and meets the preset size. It can be understood that the size of the cropped image is less than or equal to the size of the palm image. Furthermore, the terminal can extract the image features of the cropped image to obtain the image features of the cropped image, and perform advanced key point detection according to the image features of the cropped image to obtain the palm key points corresponding to the cropped image.

[0144] In one embodiment, for each palm image, the terminal can input the palm image into a trained palm key point detection model to extract the image features of the palm image through the palm key point detection model, and perform initial key point detection according to the image features of the palm image to obtain the initial key points corresponding to the palm image. For each initial key point, the terminal can crop the palm image with reference to the initial key point according to the preset size to obtain a cropped image that covers the initial key point and meets the preset size. Furthermore, the terminal can extract the image features of the cropped image to obtain the image features of the cropped image, and input the palm image into the trained palm key point detection model again to perform advanced key point detection based on the image features of the cropped image through the palm key point detection model, and output the palm key points corresponding to the cropped image.

[0145] In the above embodiments, initial key point detection is performed through the image features of the palm image to obtain the initial key points corresponding to the palm image. The initially detected initial key points may not be very accurate. Therefore, for each initial key point, the palm image is cropped with reference to the initial key point, and a cropped image that covers the initial key point and meets the preset size can be obtained. Furthermore, by extracting the image features of the cropped image and performing advanced key point detection based on the image features of the cropped image, the palm key points corresponding to the cropped image can be obtained, which can further improve the accuracy of key point detection.

[0146] As Figure 16 shown, in one embodiment, a resource transfer method is provided. In this embodiment, the method is applied to Figure 1 the terminal 102 in as an example for illustration. The method specifically includes the following steps:

[0147] Step 1602: Obtain an initial sample image and divide the initial sample image into multiple image blocks; for each image block in the initial sample image, calibrate at least one reference palm region box to obtain a sample image.

[0148] Step 1604: Obtain the sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm and the reference confidence of the reference palm region box.

[0149] Step 1606: Perform palm detection on the sample image through the palm detection model to be trained to obtain a predicted palm region box.

[0150] Step 1608: Determine a first loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box.

[0151] Step 1610: Determine the predicted confidence of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; determine a second loss value according to the confidence difference between the predicted confidence and the reference confidence.

[0152] Step 1612: Perform class probability prediction on the object in the predicted palm region box through the palm detection model to be trained to obtain the palm class probability that the object in the predicted palm region box belongs to the palm.

[0153] Step 1614: Determine a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box.

[0154] Step 1616: Determine a target loss value according to the first loss value, the second loss value, and the third loss value, and train the palm detection model to be trained through the target loss value to obtain a trained palm detection model.

[0155] Step 1618: Obtain at least one initial image collected by the image acquisition unit.

[0156] Step 1620: For each initial image, extract the image features of the initial image through the trained palm detection model, and perform palm detection based on the image features of the initial image to obtain the palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image.

[0157] Step 1622: Crop the initial image based on the palm region box to obtain the palm image corresponding to the initial image. For each palm image, extract the image features of the palm image to obtain the image features of the palm image.

[0158] Step 1624: Perform key point detection according to the image features of the palm image to obtain the palm key points corresponding to the palm image; the palm key points include a first key point and a second key point; the first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

[0159] Step 1626: Construct a first vector according to the first key point and the second key point, and use the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction; the starting point of the first vector is the first key point.

[0160] Step 1628: In the case where the palm image is a left palm image, construct a second vector along the first horizontal direction with the first key point as the new starting point.

[0161] Step 1630: In the case where the palm image is a right palm image, construct a second vector along the second horizontal direction with the first key point as the new starting point; the first horizontal direction and the second horizontal direction are opposite horizontal directions, and use the direction of the second vector as the image acquisition direction of the image acquisition unit.

[0162] Step 1632: Determine the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit.

[0163] Step 1634: Screen the palm images whose swiping angles fall within the preset swiping angle range from at least one palm image to obtain the target palm images, and perform resource transfer processing based on the palm print information in the target palm images.

[0164] The present application also provides an application scenario, which applies the above-mentioned resource transfer method. Specifically, the resource transfer method can be applied to the scenario of palm brushing payment in supermarket shopping. It can be understood that when a customer shops in a supermarket and finishes selecting goods, they need to go to the cashier to check out. The customer can choose to use palm brushing payment at the palm brushing device. It can be understood that a trained palm detection model is deployed in the palm brushing device, and the training steps of the palm detection model may include: obtaining an initial sample image and dividing the initial sample image into multiple image blocks; calibrating at least one reference palm region box for each image block in the initial sample image to obtain a sample image. Obtaining the sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm and the reference confidence of the reference palm region box. Performing palm detection on the sample image through the palm detection model to be trained to obtain a predicted palm region box. Determining a first loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box. Determining the predicted confidence of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; determining a second loss value according to the confidence difference between the predicted confidence and the reference confidence. Performing class probability prediction on the object in the predicted palm region box through the palm detection model to be trained to obtain the palm class probability that the object in the predicted palm region box belongs to a palm. Determining a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box. Determining a target loss value according to the first loss value, the second loss value, and the third loss value, and training the palm detection model to be trained through the target loss value to obtain a trained palm detection model.

[0165] When the customer places their palm above the palm brushing device, the palm brushing device can obtain at least one initial image collected by the image acquisition unit. It can be understood that the initial image may or may not include the customer's palm. For each initial image, extracting the image features of the initial image through the trained palm detection model, and performing palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image. Intercepting the initial image based on the palm region box to obtain a palm image corresponding to the initial image. For each palm image, extracting the image features of the palm image to obtain the image features of the palm image. Performing key point detection according to the image features of the palm image to obtain palm key points corresponding to the palm image; the palm key points include a first key point and a second key point; the first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

[0166] The palm brushing device can construct a first vector based on a first key point and a second key point, and use the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction; the starting point of the first vector is the first key point. In the case where the palm image is a left palm image, a second vector is constructed along a first horizontal direction with the first key point as the new starting point. In the case where the palm image is a right palm image, a second vector is constructed along a second horizontal direction with the first key point as the new starting point; the first horizontal direction and the second horizontal direction are opposite horizontal directions, and the direction of the second vector is used as the image acquisition direction of the image acquisition unit. According to the difference between the palm direction and the image acquisition direction of the image acquisition unit, the palm brushing angle of the palm in the palm image is determined. Palm images with the palm brushing angle falling within a preset palm brushing angle range are screened from at least one palm image to obtain the target palm image of the customer, and palm brushing payment processing is performed based on the palm print information in the target palm image of the customer.

[0167] It can be understood that in this application, by performing palm key point detection on the collected palm images and automatically judging the palm brushing angle based on the detected palm key points, and then screening out the target palm images of the customers for palm brushing payment from the collected palm images based on the palm brushing angle, it is possible to avoid the situation of misbrushing when the cashier signals the customer to brush their palm at the software level, thereby reducing the usage cost of the palm brushing device in the supermarket shopping scenario.

[0168] This application also provides another application scenario, which applies the above resource transfer method. Specifically, the resource transfer method can be applied to the palm brushing collection scenario for splitting the cost of a dinner among friends. It can be understood that after multiple friends have a dinner together, they usually need to split the cost of the dinner. The resource transfer method of this application can be used to achieve palm brushing collection among friends. In this way, by performing palm key point detection on the collected palm images and automatically judging the palm brushing angle based on the detected palm key points, and then screening out the target palm images of the friends for palm brushing payment from the collected palm images based on the palm brushing angle, it is possible to avoid the situation of misbrushing when the collector signals the friend to brush their palm at the software level, thereby reducing the usage cost of the palm brushing device in the palm brushing collection scenario among friends.

[0169] It should be understood that although the steps in the flowcharts of the above embodiments are shown in sequence, these steps are not necessarily executed in sequence. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.

[0170] In one embodiment, as Figure 17 shown, a resource transfer device 1700 is provided. The device specifically includes:

[0171] An acquisition module 1702, configured to acquire at least one palm image acquired by an image acquisition unit;

[0172] A detection module 1704, configured to perform key point detection on each palm image to obtain palm key points;

[0173] A determination module 1706, configured to determine the direction of the palm in the palm image according to the palm key points to obtain the palm direction; and determine the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit;

[0174] A screening module 1708, configured to screen out the palm images whose swiping angles fall within a preset swiping angle range from the at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

[0175] In one embodiment, the palm key points include a first key point and a second key point; the determination module 1706 is further configured to construct a first vector according to the first key point and the second key point, and use the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction; take the starting point of the first vector as a new starting point, construct a second vector along the horizontal direction, and use the direction of the second vector as the image acquisition direction of the image acquisition unit; wherein, the starting point of the first vector is any one of the first key point and the second key point.

[0176] In one embodiment, the starting point of the first vector is the first key point; the determining module 1706 is further configured to, when the palm image is a left palm image, use the first key point as a new starting point and construct a second vector along the first horizontal direction; when the palm image is a right palm image, use the first key point as a new starting point and construct a second vector along the second horizontal direction; wherein, the first horizontal direction and the second horizontal direction are opposite horizontal directions.

[0177] In one embodiment, the determining module 1706 is further configured to, when the palm image is a left palm image, use the first key point as a new starting point and construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image; when the palm image is a right palm image, use the first key point as a new starting point and construct a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image.

[0178] In one embodiment, the first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

[0179] In one embodiment, the obtaining module 1702 is further configured to obtain at least one initial image collected by the image acquisition unit; for each initial image, extract the image features of the initial image, and perform palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image; the initial image is intercepted based on the palm region box to obtain a palm image corresponding to the initial image.

[0180] In one embodiment, the palm region box is predicted by a trained palm detection model; the apparatus further includes:

[0181] A training module, configured to obtain a sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm; perform palm detection on the sample image through the palm detection model to be trained to obtain a predicted palm region box; determine a target loss value according to the position difference and the width and height difference between the predicted palm region box and the reference palm region box; train the palm detection model to be trained through the target loss value to obtain a trained palm detection model.

[0182] In one embodiment, the training module is further configured to obtain an initial sample image and divide the initial sample image into multiple image blocks; calibrate at least one reference palm region box for each image block in the initial sample image to obtain a sample image.

[0183] In one embodiment, the sample image also carries a reference confidence level of the reference palm region box; the training module is further configured to determine a first loss value according to the position difference and the width-height difference between the predicted palm region box and the reference palm region box; determine the predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; the region overlap degree is positively correlated with the predicted confidence level; determine a second loss value according to the confidence level difference between the predicted confidence level and the reference confidence level; and determine a target loss value according to the first loss value and the second loss value.

[0184] In one embodiment, the training module is further configured to perform class probability prediction on the object in the predicted palm region box through the palm detection model to be trained, so as to obtain the palm class probability that the object in the predicted palm region box belongs to a palm; determine a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box; and determine a target loss value according to the first loss value, the second loss value and the third loss value.

[0185] In one embodiment, the detection module 1704 is further configured to perform feature extraction on each palm image to obtain the image features of the palm image; and perform key point detection according to the image features of the palm image to obtain the palm key points corresponding to the palm image.

[0186] In one embodiment, the detection module 1704 is further configured to perform key point detection according to the image features of the palm image to obtain the initial key points corresponding to the palm image; for each initial key point, crop the palm image with reference to the initial key point to obtain a cropped image that covers the initial key point and meets the preset size; perform feature extraction on the cropped image to obtain the image features of the cropped image; and perform key point detection according to the image features of the cropped image to obtain the palm key points corresponding to the cropped image.

[0187] The above-mentioned resource transfer device obtains at least one palm image collected by the image acquisition unit. For each palm image, key point detection is performed on the palm image to obtain palm key points. The direction of the palm in the palm image is determined according to the palm key points to obtain the palm direction, and the brushing angle of the palm in the palm image is determined according to the difference between the palm direction and the image acquisition direction of the image acquisition unit. Thus, palm images with the brushing angles of the palms falling within the preset brushing angle range used to represent the party to be paid are automatically screened from at least one palm image to obtain the target palm image of the party to be paid, and resource transfer processing is performed based on the biological information in the target palm image. Compared with the traditional method of adding a physical baffle beside the brushing device to avoid misbrushing by non-paying parties at the physical level, in this application, key point detection of the collected palm images is performed, and the brushing angle of the palm is automatically judged based on the detected palm key points. Furthermore, the target palm image for brushing payment is screened from the collected palm images based on the brushing angle, so as to avoid misbrushing by non-paying parties at the software level, thereby reducing the usage cost of the brushing device.

[0188] Each module in the above-mentioned resource transfer device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor in the computer device in the form of hardware or be independent of it, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0189] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 18As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a resource transfer method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0190] Those skilled in the art can understand that Figure 18 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0191] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0192] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0193] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0195] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0196] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0197] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.

Claims

1. A resource transfer method, characterized in that, The method includes: Obtaining at least one palm image collected by an image acquisition unit; For each palm image, performing key point detection on the palm image to obtain palm key points; Determining the direction of the palm in the palm image according to the palm key points to obtain the palm direction; the palm direction is the direction in which the palm is located relative to the image acquisition unit when the image acquisition unit acquires an image of the palm; Determining the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit; the swiping angle is the included angle between the palm direction of the palm in the palm image and the image acquisition direction of the image acquisition unit; Screening out the palm images whose swiping angles fall within a preset swiping angle range from the at least one palm image to obtain target palm images, and performing resource transfer processing based on the biological information in the target palm images.

2. The method according to claim 1, characterized in that The palm key points include a first key point and a second key point; the determining the direction of the palm in the palm image according to the palm key points to obtain the palm direction includes: Constructing a first vector according to the first key point and the second key point, and taking the direction of the first vector as the direction of the palm in the palm image to obtain the palm direction; The method further includes: Taking the starting point of the first vector as a new starting point, constructing a second vector along the horizontal direction, and taking the direction of the second vector as the image acquisition direction of the image acquisition unit; Wherein, the starting point of the first vector is any one of the first key point and the second key point.

3. The method according to claim 2, wherein The starting point of the first vector is the first key point; The constructing a second vector along the horizontal direction with the starting point of the first vector as a new starting point includes: When the palm image is a left palm image, constructing a second vector along a first horizontal direction with the first key point as a new starting point; When the palm image is a right palm image, constructing a second vector along a second horizontal direction with the first key point as a new starting point; Wherein, the first horizontal direction and the second horizontal direction are opposite horizontal directions.

4. The method according to claim 3, characterized in that, The constructing a second vector along the first horizontal direction with the first key point as a new starting point when the palm image is a left palm image includes: When the palm image is a left palm image, constructing a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image with the first key point as a new starting point; The constructing a second vector along the second horizontal direction with the first key point as a new starting point when the palm image is a right palm image includes: When the palm image is a right palm image, constructing a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image with the first key point as a new starting point.

5. The method according to claim 2, wherein The first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

6. The method according to claim 1, wherein Obtaining at least one palm image collected by the image acquisition unit includes: Obtaining at least one initial image collected by the image acquisition unit; For each initial image, extracting the image features of the initial image and performing palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image; Cropping the initial image based on the palm region box to obtain a palm image corresponding to the initial image.

7. The method according to claim 6, wherein The palm region box is predicted by a trained palm detection model; the method further includes: Obtaining a sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm; Performing palm detection on the sample image through a palm detection model to be trained to obtain a predicted palm region box; Determining a target loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box; Training the palm detection model to be trained through the target loss value to obtain the trained palm detection model.

8. The method according to claim 7, wherein The obtaining the sample image includes: Obtaining an initial sample image and dividing the initial sample image into multiple image blocks; Calibrating at least one reference palm region box for each image block in the initial sample image to obtain a sample image.

9. The method according to claim 7, wherein The sample image also carries a reference confidence level of the reference palm region box; The determining the target loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box includes: Determining a first loss value according to the position difference and width-height difference between the predicted palm region box and the reference palm region box; Determining the predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; the region overlap degree is positively correlated with the predicted confidence level; Determining a second loss value according to the confidence level difference between the predicted confidence level and the reference confidence level; Determining the target loss value according to the first loss value and the second loss value.

10. The method according to claim 9, characterized in that, The determining the target loss value according to the first loss value and the second loss value includes: Performing category probability prediction on the object in the predicted palm region box through the palm detection model to be trained to obtain the palm category probability that the object in the predicted palm region box belongs to a palm; Determining a third loss value according to the difference between the predicted palm category probability and the palm category probability of the sample palm in the reference palm region box; Determining the target loss value according to the first loss value, the second loss value and the third loss value.

11. The method according to any one of claims 1 to 10, characterized in that, For each palm image, performing key point detection on the palm image to obtain palm key points, including: For each palm image, performing feature extraction on the palm image to obtain the image features of the palm image; Performing key point detection according to the image features of the palm image to obtain palm key points corresponding to the palm image.

12. The method according to claim 11, wherein Performing key point detection based on the image features of the palm image to obtain the palm key points corresponding to the palm image, including: Performing key point detection based on the image features of the palm image to obtain the initial key points corresponding to the palm image; For each initial key point, cropping the palm image with reference to the initial key point to obtain a cropped image that covers the initial key point and meets the preset size; Performing feature extraction on the cropped image to obtain the image features of the cropped image; Performing key point detection based on the image features of the cropped image to obtain the palm key points corresponding to the cropped image.

13. A resource transfer device, characterized in that, The device includes: An acquisition module, configured to acquire at least one palm image acquired by an image acquisition unit; A detection module, configured to perform key point detection on each palm image to obtain palm key points; A determination module, configured to determine the direction of the palm in the palm image based on the palm key points to obtain a palm direction; the palm direction is the direction in which the palm is located relative to the image acquisition unit when the image acquisition unit acquires an image of the palm; determining the swiping angle of the palm in the palm image according to the difference between the palm direction and the image acquisition direction of the image acquisition unit; the swiping angle is the direction angle between the palm direction of the palm in the palm image and the image acquisition direction of the image acquisition unit; A screening module, configured to screen the palm images in which the swiping angle falls within a preset swiping angle range from the at least one palm image to obtain target palm images, and perform resource transfer processing based on the biological information in the target palm images.

14. The device according to claim 13, characterized in that, The palm key points include a first key point and a second key point; the determination module is further configured to construct a first vector according to the first key point and the second key point, and use the direction of the first vector as the direction of the palm in the palm image to obtain a palm direction; Taking the starting point of the first vector as a new starting point, constructing a second vector along the horizontal direction, and using the direction of the second vector as the image acquisition direction of the image acquisition unit; wherein, the starting point of the first vector is any one of the first key point and the second key point.

15. The device according to claim 14, characterized in that The starting point of the first vector is the first key point; the determination module is further configured to, when the palm image is a left palm image, construct a second vector along a first horizontal direction with the first key point as a new starting point; When the palm image is a right palm image, constructing a second vector along a second horizontal direction with the first key point as a new starting point; wherein, the first horizontal direction and the second horizontal direction are opposite horizontal directions.

16. The device according to claim 15, wherein, The determination module is further configured to, when the palm image is a left palm image, construct a second vector along the positive direction of the horizontal axis of the image coordinate system of the left palm image with the first key point as a new starting point; When the palm image is a right palm image, constructing a second vector along the negative direction of the horizontal axis of the image coordinate system of the right palm image with the first key point as a new starting point.

17. The device according to claim 14, characterized in that, The first key point is the finger gap point between the ring finger and the little finger of the palm in the palm image; the second key point is the finger gap point between the index finger and the middle finger of the palm in the palm image.

18. The device according to claim 13, wherein The obtaining module is further configured to obtain at least one initial image collected by the image acquisition unit; for each initial image, extract the image features of the initial image, and perform palm detection based on the image features of the initial image to obtain a palm region box corresponding to the initial image; the palm region box is used to locate the region where the palm is located in the initial image; the initial image is cropped based on the palm region box to obtain a palm image corresponding to the initial image.

19. The device according to claim 18, characterized in that, The palm region box is predicted by a trained palm detection model; the device further includes: A training module, configured to obtain a sample image; the sample image includes a sample palm; the sample image carries a reference palm region box calibrated for the sample palm; perform palm detection on the sample image through the palm detection model to be trained to obtain a predicted palm region box; determine a target loss value according to the position difference and the width and height difference between the predicted palm region box and the reference palm region box; train the palm detection model to be trained through the target loss value to obtain the trained palm detection model.

20. The device according to claim 19, characterized in that, The training module is further configured to obtain an initial sample image and divide the initial sample image into multiple image blocks; calibrate at least one reference palm region box for each image block in the initial sample image to obtain a sample image.

21. The device according to claim 19, wherein The sample image also carries a reference confidence level of the reference palm region box; the training module is further configured to determine a first loss value according to the position difference and the width and height difference between the predicted palm region box and the reference palm region box; determine a predicted confidence level of the predicted palm region box according to the region overlap degree between the predicted palm region box and the reference palm region box; the region overlap degree is positively correlated with the predicted confidence level; determine a second loss value according to the confidence level difference between the predicted confidence level and the reference confidence level; determine a target loss value according to the first loss value and the second loss value.

22. The device according to claim 21, characterized in that, The training module is further configured to perform class probability prediction on the object in the predicted palm region box through the palm detection model to be trained to obtain a palm class probability that the object in the predicted palm region box belongs to a palm; determine a third loss value according to the difference between the predicted palm class probability and the palm class probability of the sample palm in the reference palm region box; determine a target loss value according to the first loss value, the second loss value, and the third loss value.

23. The device according to any one of claims 13 to 22, characterized in that, The detection module is further configured to, for each palm image, extract the image features of the palm image to obtain the image features of the palm image; perform key point detection according to the image features of the palm image to obtain palm key points corresponding to the palm image.

24. The device according to claim 23, characterized in that, The detection module is further configured to perform key point detection based on the image features of the palm image to obtain initial key points corresponding to the palm image; for each initial key point, the palm image is cropped with reference to the initial key point to obtain a cropped image that covers the initial key point and meets a preset size; feature extraction is performed on the cropped image to obtain the image features of the cropped image; key point detection is performed based on the image features of the cropped image to obtain palm key points corresponding to the cropped image.

25. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

26. A computer-readable storage medium stores a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

27. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Palm print recognition method and device thereof, computer equipment and storage medium

    CN113515987A

  • Hand image processing method and device, equipment and medium

    CN113780201A