WO2023160048A1 - 掌纹样本的生成方法、装置、设备、介质及程序产品 - Google Patents

掌纹样本的生成方法、装置、设备、介质及程序产品 Download PDF

Info

Publication number
WO2023160048A1
WO2023160048A1 PCT/CN2022/133470 CN2022133470W WO2023160048A1 WO 2023160048 A1 WO2023160048 A1 WO 2023160048A1 CN 2022133470 W CN2022133470 W CN 2022133470W WO 2023160048 A1 WO2023160048 A1 WO 2023160048A1
Authority
WO
WIPO (PCT)
Prior art keywords
palmprint
main line
sample
data
area
Prior art date
Application number
PCT/CN2022/133470
Other languages
English (en)
French (fr)
Inventor
张映艺
赵凯
沈雷
张睿欣
周楚涵
汪韬
丁守鸿
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to US18/451,515 priority Critical patent/US20230394869A1/en
Publication of WO2023160048A1 publication Critical patent/WO2023160048A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1347Preprocessing; Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • G06V10/422Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation for representing the structure of the pattern or shape of an object therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints

Definitions

  • the embodiment of the present application relates to the field of machine learning, and in particular to a method, device, equipment, medium and program product for generating a palmprint sample.
  • Palmprint recognition technology has been more and more widely used in various identity authentication scenarios due to its reliability and convenience. Palmprint recognition is based on the main lines, textures, wrinkles and other characteristics of the palm. Compared with facial recognition, it is a non-invasive recognition method and is more acceptable to users.
  • a technical solution based on deep learning is usually used to learn the internal laws of palmprint information on the stored palmprint images, so as to promote the model to learn potential features with distinguishing power, and use training
  • the obtained model analyzes the palmprint to carry out the identification process of identity information.
  • the deep network model usually relies on a large number of palmprint image sets and accurate annotation information, and palmprint information has strong privacy and security, making palmprint In the field of fingerprint recognition, there is a lack of a large number of public data sets for the model to learn, which makes the model less effective in identifying identity information.
  • Embodiments of the present application provide a method, device, equipment, medium, and program product for generating a palmprint sample.
  • the anchor point data includes first data corresponding to the first main line anchor point and second data corresponding to the second main line anchor point;
  • the palmprint main line sequentially connects the first main line positioning point, the main line adjustment point and the second main line the curve of the anchor point;
  • At least one palmprint sample including the palmprint main line is generated, the palmprint sample is used for training a palmprint recognition model, and the palmprint recognition model is used for palmprint recognition.
  • the positioning point generation module is used to generate positioning point data according to the palmprint main line distribution law, and the positioning point data includes the first data corresponding to the first main line positioning point and the second data corresponding to the second main line positioning point;
  • An adjustment point generating module configured to generate adjustment point data according to the radian rule of the main line of the palmprint, the main line adjustment point corresponding to the adjustment point data is used to control the main line formed by the first main line anchor point and the second main line anchor point radian;
  • a main line generating module configured to generate a palmprint main line based on the first data, the second data and the adjustment point data, the palmprint main line is sequentially connected to the first main line positioning point and the main line adjustment point and the curve of said second mainline anchor point;
  • the sample generation module is used to generate at least one palmprint sample including the palmprint main line, the palmprint sample is used to train the palmprint recognition model, and the palmprint recognition model is used for palmprint recognition.
  • a computer device in another aspect, includes a processor and a memory, at least one instruction, at least one program, code set or instruction set are stored in the memory, the at least one instruction, the at least A section of program, the code set or instruction set is loaded and executed by the processor to implement the method for generating a palmprint sample as described in any one of the above-mentioned embodiments of the present application.
  • a computer-readable storage medium wherein at least one instruction, at least one program, code set or instruction set are stored in the storage medium, the at least one instruction, the at least one program, the code The set or instruction set is loaded and executed by the processor to realize the method for generating a palmprint sample as described in any one of the above-mentioned embodiments of the present application.
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for generating a palmprint sample described in any one of the above embodiments.
  • FIG. 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • Fig. 2 is the flow chart of the generation method of the palmprint sample that an exemplary embodiment of the present application provides;
  • Fig. 3 is a schematic diagram of palm prints provided by an exemplary embodiment of the present application.
  • Fig. 4 is a schematic diagram of palm prints provided by an exemplary embodiment of the present application.
  • Fig. 5 is a schematic diagram of regional division of palm prints provided by an exemplary embodiment of the present application.
  • Fig. 6 is a schematic diagram of a Bezier curve provided by an exemplary embodiment of the present application.
  • Fig. 7 is the flow chart of the generation method of the palmprint sample that another exemplary embodiment of the present application provides;
  • Fig. 8 is a schematic diagram of determining a region of interest provided by an exemplary embodiment of the present application.
  • Fig. 9 is a schematic diagram of a first area and a second area provided by an exemplary embodiment of the present application.
  • Fig. 10 is a schematic diagram of a third area provided by an exemplary embodiment of the present application.
  • Fig. 11 is a schematic diagram of determining a third area provided by an exemplary embodiment of the present application.
  • Fig. 12 is the flow chart of the generation method of the palmprint sample that another exemplary embodiment of the present application provides;
  • Fig. 13 is a schematic diagram of a palmprint sample provided by an exemplary embodiment of the present application.
  • Fig. 14 is a schematic diagram of a target image provided by an exemplary embodiment of the present application.
  • Fig. 15 is the flow chart of the palmprint recognition model training that an exemplary embodiment of the present application provides;
  • Fig. 16 is a flow chart of the palmprint recognition process provided by an exemplary embodiment of the present application.
  • Fig. 17 is a structural block diagram of a generating device of a palmprint sample provided by an exemplary embodiment of the present application.
  • Fig. 18 is a structural block diagram of a device for generating a palmprint sample provided by another exemplary embodiment of the present application.
  • Fig. 19 is a structural block diagram of a server provided by an exemplary embodiment of the present application.
  • a technical solution based on deep learning is usually used to learn the internal laws of palmprint information on the stored palmprint images, so as to promote the model to learn potential features with distinguishing power, and use training
  • the obtained model analyzes the palmprint to carry out the identification process of identity information.
  • the deep network model usually relies on a large number of palmprint image sets and accurate annotation information, and palmprint information has strong privacy and security, making palmprint
  • a method for generating palmprint samples is provided, so that the generated palmprint samples have stronger diversity, thereby improving the robustness of the palmprint recognition model trained by the palmprint samples.
  • the generation method of the palmprint sample that the application is trained include at least one of the following scenarios when applied.
  • the positioning point data is generated according to the palmprint main line distribution law
  • the adjustment point data is generated according to the palmprint main line radian law
  • multiple palmprint main lines are determined by the positioning point data and the adjustment point data
  • the palm print texture may obtain different palm print texture images due to parameters such as different palm stretch shapes, lighting changes during shooting, and noise caused by shooting equipment.
  • parameters such as different palm stretch shapes, lighting changes during shooting, and noise caused by shooting equipment.
  • misjudgment may occur.
  • the positioning point data is generated according to the palmprint main line distribution law
  • the adjustment point data is generated according to the palmprint main line radian law
  • multiple palmprint main lines are determined by the positioning point data and the adjustment point data
  • the information including but not limited to user equipment information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • signals involved in this application All are 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 the relevant countries and regions.
  • the palmprint data involved in this application are all obtained under full authorization.
  • the terminal 110 is installed with an application program having the function of obtaining palmprint data.
  • the terminal 110 is used to send the palmprint data to the server 120 .
  • the palmprint data includes not only image data corresponding to the palmprint, but also texture data corresponding to the palmprint.
  • the server 120 can determine data information such as the distribution law of the main line of the palmprint and the radian law of the main line of the palmprint according to the palmprint data, and based on the distribution law of the main line of the palmprint and the radian law of the main line of the palmprint, identify the palmprint according to the palmprint recognition model 121, Optionally, the palmprint recognition result after the palmprint recognition is presented on the terminal 110 .
  • the palmprint recognition model 121 adopts the following method to train and obtain: according to the distribution rule of the main line of the palmprint, generate the first data corresponding to the anchor point representing the first main line, and the second data corresponding to the anchor point representing the second main line; According to the radian law of the main line of the palm print, the adjustment point data for controlling the radian of the main line is generated; the curve obtained after connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in turn is used as the palm print main line, and at least one palm print containing the palm print main line is generated. Pattern samples, the palmprint recognition model is trained with the palmprint samples, the above-mentioned process is an example of the non-unique situation of the palmprint recognition model 121 training process.
  • the above-mentioned terminals include but are not limited to mobile terminals such as mobile phones, tablet computers, portable laptop computers, intelligent voice interaction devices, smart home appliances, and vehicle-mounted terminals, and can also be implemented as desktop computers; the above-mentioned servers can be independent
  • a physical server can also be a server cluster or a distributed system composed of multiple physical servers, and can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services , security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, applications, and networks in a wide area network or a local area network to realize data calculation, storage, processing, and sharing.
  • Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on cloud computing business model applications. It can form a resource pool and be used on demand, which is flexible and convenient. Cloud computing technology will become an important support.
  • the background services of technical network systems require a lot of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, each item may have its own identification mark in the future, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data need to be powerful.
  • the system backing support can only be realized through cloud computing.
  • the above server can also be implemented as a node in the blockchain system.
  • the method for generating a palmprint sample provided by the present application can be specifically applied to a computer device, which can be a terminal or a server, and the method can be executed independently by the terminal or server itself, or can be realized through the interaction between the terminal and the server.
  • the first main line locating point and the second main line locating point are generated according to the palmprint main line distribution law, and the adjustment point data for controlling the main line radian are generated according to the palmprint main line radian law, and the first The curve obtained by connecting the main line anchor point, the main line adjustment point and the second main line anchor point in turn is used as the palmprint main line, and at least one palmprint sample containing the palmprint main line is generated, and the palmprint recognition model is trained with the palmprint samples.
  • a plurality of palmprint samples are simulated, because the palmprint samples are determined by means of generating data (the first main line anchor point, the second main line anchor point and the adjustment point data) , so the generated palmprint samples are in large batches, and there is no upper limit on the number, so that the generated palmprint samples have a stronger diversity.
  • the palmprint recognition model is trained based on the generated palmprint samples, it can prompt the palmprint recognition model to mine more texture internal laws and information not involved in the palmprint data set, break through the limitations of the palmprint data set, and improve the palmprint recognition model. Robustness of the pattern recognition model.
  • the method for generating palmprint samples provided by this application is described. Taking the method applied to a server as an example, as shown in FIG. 2 , the method includes the following steps 210 to 240.
  • Step 210 generate anchor point data according to the distribution law of the main line of the palmprint.
  • the anchor point data includes first data corresponding to the first main line anchor point and second data corresponding to the second main line anchor point.
  • the distribution rule of the main lines of the palmprint is used to indicate the distribution of the main lines in the palmprint.
  • the palm prints mainly include the main line of the palm prints and the fine lines of the palm prints, wherein the general characteristics of the palm prints include at least one of the following: (1 ) The distribution of the main lines of palmprints is relatively certain, while the distribution of fine lines of palmprints is relatively random; (2) The main lines of palmprints usually have longer, thicker and deeper texture characteristics in palmprints. As far as the main line of the palm print is concerned, it has thinner, shorter, and shallower texture features.
  • the distribution of the main lines of the palm prints usually presents a diagonal relationship, that is, the distribution of the main lines of the palm prints is a diagonal rule.
  • the main line of the palmprint generally starts at the upper left corner and ends at the lower right corner; taking the palm of the right hand as an example, the main line of the palmprint generally starts at the upper right corner and ends at the lower left corner. As shown in FIG.
  • FIG. 3 it is a schematic diagram of the palmprint of the palm of the left hand, wherein the palm area 310 includes the main line 320 and the fine lines 330, the thicker line is used to indicate the main line 320, and the thinner line is used to indicate the fine lines 330, namely :
  • the palm area 310 includes three main lines 320 and 13 fine lines 330 .
  • the distribution of the main lines of the palmprint usually presents a variety of palmprint forms such as herringbone lines, turtle-shaped lines, and vertical lines, that is, the distribution of the main lines of the palmprints on the soles of the feet
  • palmprint forms such as herringbone lines, turtle-shaped lines, and vertical lines, that is, the distribution of the main lines of the palmprints on the soles of the feet
  • the herringbone pattern on the sole of the foot when there are two main lines of the herringbone pattern, the two main lines generally start from the top and present a cross or connection form.
  • Figure 4 it is a schematic diagram of the sole of the foot, which includes a herringbone pattern, the herringbone pattern includes two main lines, the two main lines cross at the top, and the first main line 410 ends at the lower left corner, and the second main line 420 ends in the lower right corner.
  • the main line of the chevron pattern is one, the main line starts at the lower left corner and ends at the lower right corner, wherein the main line is relatively curved and presents a positive "human" shape with the starting point and the ending point of the main line.
  • the main line starts at the top and ends at the bottom, where the main line has a relatively large degree of curvature and presents a "herringbone” shape placed sideways to the starting and ending points of the main line wait.
  • the main lines of the vertical lines generally include at least one line, and the main line generally starts from the top and ends from the bottom. It should be noted that, the above is only an illustrative example, which is not limited in this embodiment of the present application.
  • the anchor point data is used to indicate the fixation of the main line, including first data and second data. Based on the first data and the second data, the starting condition and the ending condition of the main line are determined, and the distribution conditions of the main line are roughly determined.
  • the first data corresponds to the first main line anchor point; the second data corresponds to the second main line anchor point.
  • the starting point of the main line of the palmprint is used as the first main line positioning point, and the ending point of the main line of the palmprint is used as the second main line positioning point.
  • the generation of the positioning point data includes at least one of the following manners.
  • the first data and the second data are randomly generated.
  • the line segment connected between the first main line anchor point and the second main line anchor point is proportionally scaled with the coordinate area, and then the first main line anchor point corresponding to the first data is determined, and the second main line anchor point is determined.
  • the second main line anchor point corresponding to the second data is determined.
  • the distribution range of the main lines of the palm prints is determined.
  • the palm of an adult is approximately 16-22 cm in length
  • the main line of the palm print is roughly distributed in the palm area of the palm
  • the palm area of the adult's palm is approximately 8-12 cm.
  • the size of the distribution area can be a square area with a side length of 8 cm, a rectangular area with a side length of 6 cm, or a rhombus with a diagonal of 10 cm. area etc.
  • the first main line anchor point corresponding to the first data and the second main line anchor point corresponding to the second data are randomly generated.
  • the distribution area of the preset palmprint main line is taken as an example for illustration.
  • the distribution area of the palmprint main line the distribution area is divided into regions to obtain the division area.
  • the distribution area is randomly generated The way to generate the first data and the second data.
  • two divided areas are obtained. In the first divided area, the first main line anchor point corresponding to the first data is generated, and in the second divided area, the second data corresponding to The anchor point of the second main line.
  • the sum of the multiple division areas can be implemented as the entire distribution area or as part of the distribution area, that is, the division area for generating the positioning point data can be It includes all distribution areas, or only some distribution areas, etc.
  • the palm of the left hand is taken as an example for illustration. Taking the palm 510 of the left hand as the distribution area of the main line of the palmprint, after dividing the distribution area, four divided areas are obtained, namely: the upper left corner area 520, the lower left corner area 530, the upper right corner area 540 and the lower right corner area 550.
  • the starting point of the main line of the palm print (the first main line anchor point) is located in the upper left corner area 520, and the end point of the main line of the palm print (the second main line anchor point) is located in the lower right corner area 550, so the upper left
  • the corner area 520 is used as a division area for generating the first data
  • the lower right corner area 550 is used as a division area for generating the second data.
  • Step 220 generating adjustment point data according to the radian law of the main line of the palmprint.
  • the main line adjustment point corresponding to the adjustment point data is used to control the radian of the main line formed by the first main line anchor point and the second main line anchor point.
  • the radian rule of the main line of the palmprint is used to indicate the radian of the main line in the palmprint.
  • the main line of the palmprint is usually not a straight line segment, but a curve with a certain radian.
  • the adjustment point data is determined in the area between the first main line anchor point and the second main line anchor point according to the radian rule of the palmprint main line.
  • a Bezier curve is used to parametrically describe the geometric appearance of the palmprint.
  • at least one Bezier curve is used to describe the main line of the palm print.
  • Bezier curve is a mathematical curve applied to two-dimensional graphics applications.
  • Bezier curves are composed of line segments and nodes. Nodes are draggable fulcrums, and line segments are similar to stretchable rubber bands.
  • the radians of line segments are controlled by nodes to obtain corresponding curves.
  • any palmprint main line as an example, and use a second-order Bezier curve to form the palmprint main line, that is, use three data (parameter points) in a two-dimensional (2D, 2-Dimensional) plane to complete Determination of a palmprint main line (Bezier curve).
  • the three data are respectively the first data representing the first main line anchor point, the main line adjustment point and the second data representing the second main line anchor point.
  • FIG. 6 it is a schematic diagram of determining the main line of the palmprint using the Bezier curve method.
  • the area surrounded by the horizontal axis and the vertical axis is the generation area of the main line of the palmprint, and the numbers marked on the horizontal axis and the vertical axis are used to assist in determining the coordinate positions of the three data.
  • the schematic diagram includes three palmprint main lines, each palmprint main line is determined by the first data, the main line adjustment point and the second data, and the "inverted triangle symbol” is used to indicate the first main line positioning point corresponding to the first data;
  • the "star symbol” is used to indicate the adjustment point of the main line;
  • the “circle symbol” is used to indicate the second main line anchor point corresponding to the second data.
  • the first main line anchor point corresponding to the first data and the second main line anchor point corresponding to the second data are generated first, and then the main line adjustment point is generated between the first main line anchor point and the second main line anchor point.
  • the main line adjustment point is generated based on the restriction relationship of the coordinate area between the first main line anchor point and the second main line anchor point.
  • the coordinates of the first main line anchor point of the palmprint main line 610 are (0.0,0.4), the coordinates of the main line adjustment point are (0.5,0.6), and the coordinates of the second main line anchor point are (0.6,1.0);
  • the coordinates of the first main line anchor point of 620 are (0.0, 0.0), the coordinates of the main line adjustment point are (0.7, 0.3), and the coordinates of the second main line anchor point are (1.0, 1.0);
  • the first main line of the palmprint main line 630 The coordinates of the anchor point are (0.4, 0.0), the coordinates of the adjustment point of the main line are (0.6, 0.2), and the coordinates of the anchor point of the second main line are (1.0, 0.3).
  • Step 230 generating a palmprint main line based on the first data, the second data and the adjustment point data.
  • the palmprint main line is a curve connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in sequence.
  • the palmprint main line 610 is obtained by sequentially connecting the first main line anchor point, the main line adjustment point and the second main line anchor point, so that the palmprint main line 610 appears to protrude upwards substantially
  • the arc curve of the palm print main line 620 is obtained after connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in sequence, so that the palm print main line 620 appears as an upwardly slightly convex arc curve;
  • the palmprint main line 630 is obtained by sequentially connecting the first main line anchor point, the main line adjustment point and the second main line anchor point, so that the palmprint main line 630 presents a downward concave arc.
  • Step 240 generating at least one palmprint sample including the main line of the palmprint.
  • the palmprint samples are used for training the palmprint recognition model
  • the palmprint recognition model is used for palmprint recognition
  • At least one palmprint main line is included in a palmprint sample, for example: based on the observation of the palmprint data possessed by the creature itself, the number of palmprint mainlines is generally 2 to 5, that is: based on the palmprint data of the creature itself
  • a palmprint sample includes two palmprint main lines; or, a palmprint sample includes three palmprint main lines; or, a palmprint sample includes four palmprint main lines ; Or, five palmprint main lines are included in a palmprint sample.
  • the same palmprint main line generation method is used to generate multiple palmprint main lines.
  • the anchor point data corresponding to multiple palmprint main lines can be the same or different.
  • the first main line anchor points corresponding to palmprint main line 1 and palmprint main line 2 are both point A, but the second main line anchor point of palmprint main line 1 is point B, and the second main line anchor point of palmprint main line 2 is C
  • the second main line anchor point corresponding to palmprint main line 1 and palmprint main line 2 is point C, but the first main line anchor point of palmprint main line 1 is point A, and the first main line anchor point of palmprint main line 2 is point B
  • the first main line anchor points corresponding to palmprint main line 1 and palmprint main line 2 are both point A and the second main line anchor points are both point B, but the main line adjustment point of palmprint main line 1 is point C
  • the main line adjustment point of palmprint main line 2 is point D and so on.
  • 2 to 5 palmprint main lines are randomly selected from the plurality of generated palmprint main lines to obtain palmprint samples.
  • a palmprint sample includes three palmprint main lines as an example for illustration.
  • this palmprint sample in addition to the three palmprint main lines, it also includes palmprint fine lines. Compared with the palmprint main lines, the palmprint fine lines have shorter and shallower texture features. Schematically, the process of generating fine lines of palm lines is described.
  • At least two fine line positioning points of palm lines are determined; and fine lines of palm lines are generated based on the at least two fine line positioning points of palm lines.
  • the palmprint fine-print positioning points are used to determine the generation range of the fine-print lines.
  • at least two palm-print fine-print positioning points are generated according to the distribution rule of the palmprint fine-prints.
  • the distribution rules of the fine lines of the palm include various distribution rules such as the length rule, the thickness rule, and the density rule of the palm print fine lines.
  • the length regularity of palm prints is used to indicate the length limit of palm prints, for example: the length of palm prints is shorter than the shortest palm print main line among multiple palm print main lines; or, palm prints The length is less than a preset length threshold (eg: 3 cm), etc.
  • a preset length threshold eg: 3 cm
  • the thickness rule of palmprint lines is used to indicate the thickness limit of palmprint lines, for example: the thickness of palmprint lines is smaller than the thinnest palmprint main line among multiple palmprint main lines; or, The thickness of the fine lines of the palmprint is smaller than a preset thickness threshold (for example: 1mm).
  • the density rule of palmprint fine lines is used to indicate the mutual distribution of at least two palmprint fine lines in the palmprint generation area, for example: a predetermined X area (preset area) in the palmprint generation area ), it is stipulated to generate at least 3 palm prints; or, the palm print generation area is divided into several sub-regions of unit length (1 cm), and it is stipulated that each sub-region should have at least two palm prints, etc.
  • the distribution of fine palm prints is relatively scattered and random. Based on the distribution of fine prints of palm and the distribution of palm print data stored in the palm print database, at least one of the following In the method, at least one palm print fine line is generated in the palm print generation area.
  • the preset length threshold of fine palm lines is 3 cm
  • the preset thickness threshold of fine palm lines is 1 mm.
  • randomly generate a palmprint fineline anchor point and determine at least one remaining palmprint fineline anchor point within the preset length threshold and preset thickness threshold of the palmprint fineline, and obtain at least two A palmprint fineline anchor point.
  • based on at least one remaining palmprint fineline anchor point, within the preset length threshold and preset thickness threshold of the palmprint fineline determine the rest of the palmprint fineline anchor points and the like.
  • the palmprint generation area based on the distribution law of the palmprint fine lines, at least two points are randomly generated as at least two palmprint fine line positioning points; or, after dividing the palmprint generation area, at least There are two sub-regions, and the fine-print positioning points for generating the fine-print palm lines are determined in the sub-regions.
  • the manner of obtaining the fine lines of the palm lines includes at least one of the following.
  • any two palmprint fineline positioning points to obtain palmprint finelines in the form of line segments; or, connect any number of palmprint fineline positioning points After pointing, get the palmprint fine lines of irregular line segment shape; or, under the condition of considering the short length of fine lines, any number of (two or more) palmprint fine line positioning points can be regarded as a group of fine line positioning Point group, within a certain length range, get palm lines and fine lines, etc.
  • an adjustment point of fine lines of palm lines is determined.
  • the palm print fine line adjustment point is used to control the radian between at least two palm print fine line positioning points.
  • the method of the Bezier curve is used to determine the fine lines of the palm lines. That is: after generating at least two palmprint fine-print anchor points, determine the palmprint fine-print adjustment point that adjusts the radian of the line segment between at least two palmprint fine-print anchor points; process to obtain different fine lines of palm lines corresponding to different positions of the adjustment points of palm lines, such as: presenting in the form of an arc with a large radian, or presenting in the form of an irregular curve with a small bending range, etc.
  • the fine lines of the palm are determined based on at least two positioning points of the fine lines of the palm and adjustment points of the fine lines of the palm within a preset number range of the fine lines of the palm.
  • the number of the main line of the palmprint and the number of fine lines of the palmprint is preset.
  • the number of palmprint main lines is 2 to 5
  • the number of palmprint fine lines is 5 to 15.
  • preset the number of palmprint fine lines is 5 to 15.
  • At least one palmprint sample including the main line of the palmprint and the fine lines of the palmprint is generated within a preset number of palmprints.
  • the range of the number of palmprints includes at least one of the range of the number of main lines of palmprints and the range of the number of fine lines of palmprints.
  • the palmprint sample includes a certain number of palmprint main lines and palmprint fine lines. The number of lines is similar to the number of main palm lines and fine lines of palm lines that living things have.
  • the number of palmprint main lines is controlled to be 2 to 5, the number of palmprint fine lines is 5 to 15, and multiple palmprint samples are obtained.
  • the number of palmprint main lines is 3, and the number of palmprint fine lines is 12; in the second palmprint sample, the number of palmprint main lines is 5, and the number of palmprint fine lines 10; in the third palmprint sample, the number of palmprint main lines is 4, the number of palmprint fine lines is 5, etc.
  • the generated palmprint samples only include palmprint main lines, and different palmprint samples are determined based on the direction of different palmprint main lines and the distribution relationship among multiple palmprint main lines.
  • the trend of the main line of the palmprint is used to indicate the relationship between the first main line anchor point, the main line adjustment point and the second main line anchor point;
  • the relationship between the main lines of grain (such as: cross relationship, parallel relationship, distance relationship, etc.).
  • a slight perturbation is added to the generated palmprint sample, and the palmprint sample after adding the slight perturbation is regarded as the palmprint data corresponding to the same identity. That is: multiple target samples obtained after perturbing the palmprint samples within the target perturbation interval are regarded as palmprint data corresponding to the same identity (ID, Identity Document).
  • a disturbance interval of the slight disturbance is predetermined, and the disturbance performed on the palmprint sample within the disturbance interval is regarded as a slight disturbance, wherein, performing disturbance on the palmprint sample includes at least one of the following implementation manners.
  • the palmprint main line in the palmprint sample is a smooth curve formed by sequentially connecting the first main line anchor point, the main line adjustment point and the second main line anchor point.
  • disturbing the palmprint main line in the palmprint sample both Including in the disturbance interval, disturbing any point in the first main line anchor point, the main line adjustment point and the second main line anchor point in the main line of the palmprint; Disturb any two points in the anchor point, the main line adjustment point and the second main line anchor point; also include in the disturbance interval, the first main line anchor point, the main line adjustment point and the second main line anchor point in the palmprint main line at the same time disturbance etc.
  • the preset disturbance interval includes the disturbance interval X of the first main line anchor point, the disturbance interval Y of the main line adjustment point and the disturbance interval Z of the second main line anchor point, the disturbance interval X, the disturbance interval Y and the disturbance interval Z
  • the preset disturbance ranges can be the same or different.
  • the fine lines of palm lines include not only a straight line formed by two fine line positioning points of palm lines, but also a curve formed by the positioning points of fine lines of palm lines and a fine line adjustment point.
  • the palmprint is a straight line composed of two palmprint positioning points, the process of disturbing the palmprint in the palmprint sample is realized as the palmprint in the palmprint within the disturbance interval.
  • the palmprint main line in the palmprint sample is a smooth curve formed by sequentially connecting the first main line anchor point, the main line adjustment point and the second main line anchor point.
  • the straight line formed also includes the curve formed by the fine line positioning points and the adjustment points of the palm lines.
  • any of the first main line anchor point, the main line adjustment point and the second main line anchor point in the palmprint main line When one or more points are disturbed, at the same time, any one or more points of the palm print fine line positioning points and the fine line adjustment points are disturbed.
  • the perturbed palmprint samples corresponding to a plurality of palmprint samples are obtained, and the multiple perturbed palmprint samples are combined with Unperturbed palmprint samples are regarded as palmprint data corresponding to the same ID.
  • the palmprint sample A is slightly disturbed by the above disturbance method, and the palmprint sample B, the palmprint sample C, and the palmprint sample A are obtained after the palmprint main line in the palmprint sample A is disturbed.
  • the first main line anchor point and the second main line anchor point are generated;
  • the curve obtained after the second main line anchor points are connected sequentially is used as the main line of the palmprint, and at least one palmprint sample containing the main line of the palmprint is generated, and the palmprint recognition model is trained with the palmprint samples.
  • the palmprint recognition model When training the palmprint recognition model based on the generated palmprint samples, it can prompt the palmprint recognition model to mine more texture internal laws and information that are not involved in the palmprint data set, break through the limitations of the palmprint data set, and improve Robustness of Palmprint Recognition Models.
  • Step 710 to step 770 are as follows.
  • Step 710 Determine the first area and the second area corresponding to the direction of the main line of the palmprint according to the distribution rule of the main line of the palmprint.
  • the palm print is taken as an example for illustration, and the distribution of the main lines of the palm print has certain rules.
  • Figure 3 it is a schematic diagram of the distribution of palm prints, wherein, the main line 320 of the palm print is generally presented in the form that the upper left corner is the first main line anchor point, and the lower right corner is the second main line anchor point; The lower corner is regarded as the first main line anchor point of the palmprint main line 320 , and the upper left corner is regarded as the second main line anchor point of the palmprint main line 320 .
  • the main line of the palmprint is analyzed in the form of the upper left corner as the first main line anchor point and the lower right corner as the second main line anchor point.
  • the palmprint generation area is determined according to the distribution law of the main lines of the palmprint.
  • the palmprint generation area is used to frame the distribution range of the palmprint main line.
  • the palmprint generating area is determined randomly, for example: generating a rectangular area whose unit length (1 cm) is the side length; or generating an irregularly shaped area whose preset length is the maximum diagonal.
  • the palmprint generating area may also be determined based on the palmprint distribution of the palmprint.
  • FIG. 8 it is a schematic diagram of palm prints. Taking the palmprint distribution of the palmprint shown in FIG. 8 as an example for illustration, according to the distribution rule of the palmprint main line of the palm, the process of determining the palmprint generation area includes the following process.
  • a target detector is used to detect the crevices of the fingers, and determine the key point A between the index finger 810 and the middle finger 820, the key point B between the middle finger 820 and the ring finger 830, and the key point between the ring finger 830 and the little finger Point C, key point A, key point B, and key point C are determined as three key points of finger gaps, which are used as positioning results of finger gap key point positioning.
  • the target detector is used to detect the finger gap, the midpoint between the two thumbs is used as the key point of the finger gap.
  • a local coordinate system is established according to the key point.
  • the manner of determining the position of the central point D of the palmprint generation area includes: determining according to the width and length of the palm of the palm; or determining according to the distance between key points, etc.
  • the determination is made based on the width and length of the palm of the palm. For example: take the width of the palm of the palm and the length of the palm of the palm as the side lengths to construct a rectangle. Based on the intersection of the diagonals in the rectangle, the position of the center point D of the palmprint generation area is determined.
  • the palmprint generation area is determined according to the center point of the palmprint generation area. For example: take the center point D of the palmprint generation area as the center, construct a rectangular area with a certain side length, and use the rectangular area as the palmprint generation area; or, take the center point D of the palmprint generation area as the center of gravity to construct an irregular In the palm shape area, the irregular palm shape is used as a palm print generation area and the like.
  • the center point D of the palmprint generation area Take the center point D of the palmprint generation area as the center, and take the constructed rectangular area as the palmprint generation area as an example for illustration. According to the length relationship between the key points, the side length of the rectangular area is determined.
  • the AC distance is used as the side length of the palmprint generation area; or, 7/6 times of the AC distance is used as the side length of the palmprint generation area wait.
  • the above-mentioned palmprint generation area can also be referred to as a region of interest (ROI, Region Of Interest), that is: the palmprint generation area is the area of focus in generating the palmprint process, and palmprint generation is carried out in this area process.
  • ROI Region Of Interest
  • the direction of the main line of the palm print has certain rules.
  • the direction of the main line of the palm print in the palm print is from the upper left corner to the lower right corner.
  • a first vertex and a second vertex in a diagonal relationship are determined within the palmprint generation area.
  • the palmprint generation area is a rectangular area, and the vertices that are determined to be in a diagonal relationship in the rectangular area are respectively determined as the first vertex and the second vertex, wherein the vertices that are in a diagonal relationship Including apex 910 and apex 940; apex 920 and apex 930.
  • the vertex 910 is the first vertex
  • the vertex 940 is the second vertex
  • the vertex 920 is the first vertex
  • the vertex 930 is the second vertex, and so on.
  • the palmprint distribution of the left hand palm is analyzed, and the palmprint of the left hand generally presents a palmprint trend from the upper left corner to the lower right corner, that is, if the palmprint generation area is a rectangular area as shown in Figure 9, Then the direction of the main line of the palmprint is from the vertex 910 (the first vertex) to the vertex 940 (the second vertex).
  • the first area is determined within the palmprint generation area with the first vertex as the center and the first preset length as the radius.
  • the first area determined based on the first vertex is a fan-shaped area, wherein the dot of the fan-shaped area is the first vertex, and the radius of the fan-shaped area is the first preset length.
  • the fan-shaped area is regarded as a 1/4 circular area, wherein the midpoint of the circular area is the first vertex, and the radius of the circular area is the first preset length.
  • the first preset length can be a preset fixed value, or a value determined based on the palmprint generation area.
  • the first preset length is a preset fixed value.
  • the first vertex is taken as the center and the preset fixed value is used as the radius to determine within the palmprint generation region.
  • the first area; or, the first preset length is based on the numerical value determined in the palmprint generation area (such as: take the side length in the palmprint generation area as the diameter; or, take half of the side length in the palmprint generation area as the diameter, etc. ), when determining the first area based on the first vertex, with the first vertex as the center and the value determined based on the palmprint generation area as the radius, determine the first area in the palmprint generation area, etc.
  • the palmprint generation area is a square area of unit length, as shown in Figure 9, the dot is the third vertex, for the first main line anchor point, the coordinate definition of the first main line anchor point is as follows :
  • x is used to indicate the horizontal axis coordinate
  • y is used to indicate the vertical axis coordinate
  • the second area is determined within the palmprint generation area with the second vertex as the center and the second preset length as the radius.
  • the process of determining the second region according to the second vertex is similar to the process of determining the first region according to the first vertex.
  • the length values of the second preset length and the first preset length can be the same or different.
  • the palm print generation area is a square area, when the second preset length is the same as the length value of the first preset length, the second vertex is the center and the second preset length is the radius formed
  • the second area and the first area formed with the first apex as the center and the first preset length as the radius are fan-shaped areas, and the first area and the second area are areas of the same shape.
  • x is used to indicate the horizontal axis coordinate
  • y is used to indicate the vertical axis coordinate
  • the second region formed with the second vertex as the center and the second preset length as the radius is the same as the first vertex as the center and the second region with the second preset length as the radius.
  • a preset length is different in the shape of the first area formed by the radius, such as: when the palmprint generation area is a square area, if the length value of the second preset length is larger, the length value of the first preset length is smaller hour, the second area corresponding to the second preset length is larger than the first area corresponding to the first preset length.
  • Step 720 Determine the first data corresponding to the first main line anchor point in the first area.
  • the first data corresponding to the first main line anchor point is determined in a random selection manner.
  • random selection is used to indicate a selection method with equal probability.
  • the coordinates corresponding to a certain coordinate point are randomly used as the coordinates of the first main line anchor point in an equal probability manner to realize the process of generating the first data.
  • the first data corresponding to the first main line positioning point is determined in the first area in a non-equal probability selection manner. For example: after analyzing the palmprint distribution, it is found that most of the palmprint main lines start from point M, then when determining the first data in the first area, set the probability of using point M as the first main line positioning point is relatively large, thereby realizing the process of selecting the first data in a non-equal probability selection manner.
  • Step 730 Determine the second data corresponding to the second main line anchor point in the second area.
  • the second data corresponding to the first main line anchor point is determined in a random selection manner.
  • random selection is used to indicate a selection method with equal probability.
  • the coordinates corresponding to a certain coordinate point are randomly used as the coordinates of the second main line anchor point in an equal probability manner to realize the process of generating the second data.
  • the second data corresponding to the second main line positioning point is determined in the second area in a non-equal probability selection manner. For example: after analyzing the palmprint distribution of the palmprint, it is found that most of the palmprint main lines of the palmprint end at point N and point L, then when determining the second data in the second area, set the points N, L The probability of the point as the positioning point of the second main line is relatively high, and then the process of selecting the second data in a non-equal probability selection method is realized.
  • Step 740 according to the radian rule of the main line of the palmprint, and based on the positional relationship between the first main line anchor point and the second main line anchor point, determine the third area.
  • the radian rule of the main line of the palmprint is used to indicate the curvature of the main line of the palmprint.
  • the arc of the main line of the palm print is relatively small; the curvature of the main line of the palm print is relatively smooth.
  • a third area for generating the main line adjustment point is determined.
  • the target line segment is obtained by connecting the first main line anchor point and the second main line anchor point.
  • a rectangular area with a preset side length is used as the third area.
  • the preset side length includes both a preset fixed value and a value determined based on the palmprint generation area.
  • the preset side length is a preset fixed value.
  • the preset fixed values include: the length a of the rectangle and the width b of the rectangle, centered on the midpoint of the line segment, the length a of the rectangle is the length of the third area, and the width b of the rectangle is the width of the third area , so as to obtain the third region.
  • the preset side length is a value determined based on the palmprint generation area (such as: taking half of the side length in the palmprint generation area as the side length; or, taking half of the target line segment in the palmprint generation area as the side length, etc.),
  • the midpoint of the line segment is the center
  • the value determined based on the palmprint generation area is the side length
  • the third area is determined in the palmprint generation area, etc.
  • the third area 1050 is obtained by taking the midpoint of the target line segment 1040 as the center and taking a preset fixed value as the side length.
  • the process of determining the third area is as follows.
  • the length of the palmprint generation area is unit length 1
  • the third area to be obtained is a square area
  • the side length of this square area is preset to 2/3
  • the third area is based on the midpoint coordinates (x c , y c ) is a square area whose center is parallel to the target line segment and whose side length is 2/3.
  • the third area is delineated by determining a straight line equation, and the straight line equation is uniquely determined by the main line anchor point and the second main line anchor point.
  • the relationship of k 1 , b 1 , k 2 and b 2 is as follows:
  • the straight line B can be uniquely determined.
  • the preset side length of the third area is 2/3, determine two A straight line A 1 1120 and a straight line A 2 1130 with a vertical distance of 1/3; two straight lines B 1 1140 and a straight line B 2 1150 parallel to the straight line B and with a vertical distance of 1/3 from the straight line B.
  • Step 750 generating adjustment point data in the third area.
  • adjustment point data for adjusting the radian of the main line is generated from within the third area.
  • the coordinate value range of the adjustment point data can be defined as follows:
  • k 1 is used to indicate the slope corresponding to the straight line A 1 1120 and the straight line A 2 1130; b 3 is used to indicate the intercept corresponding to the straight line A 1 1120; b 4 is used to indicate the intercept corresponding to the straight line A 2 1130; k 2 b 5 is used to indicate the intercept corresponding to the straight line B 1 1140; b 6 is used to indicate the intercept corresponding to the straight line B 2 1150.
  • Step 760 generating a palmprint main line based on the first data, the second data and the adjustment point data.
  • the palmprint main line is a curve connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in sequence.
  • the main line of the palmprint is a curve obtained by sequentially connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in sequence.
  • the coordinate positions of the first main line anchor point and the second main line anchor point are determined, and the main line adjustment point can adjust the radian of the line segment enclosed between the first main line anchor point and the second main line anchor point, so as to obtain different palm
  • the main line of the palm print that is, the position of the adjustment point of the main line is also closely related to the formation of the main line of the palm print.
  • Step 770 generating at least one palmprint sample including the main line of the palmprint and the fine lines of the palmprint.
  • the palmprint samples are used to train the palmprint recognition model, and the palmprint recognition model is used for palmprint recognition.
  • the palmprint samples include palmprint main lines and palmprint fine lines.
  • the palmprint recognition model is trained based on at least one palmprint sample, so that the palmprint model learns the relationship and differences between different palmprint samples, and then palmprint recognition The recognition efficiency of the model in the process of palmprint recognition is higher.
  • a slight disturbance is added to the palmprint samples within a predetermined disturbance interval, and the palmprint samples after adding slight disturbances are regarded as palmprint data corresponding to the same ID.
  • multiple different perturbation operations are performed on one palmprint sample to obtain multiple palmprint data corresponding to the palmprint sample. For example: within a predetermined disturbance interval, for a palmprint sample, the main line of the palmprint in the palmprint sample is disturbed to obtain a palmprint data; the palmprint fine lines in the palmprint sample are disturbed to obtain Another palmprint data etc.
  • the palmprint sample and the palmprint data obtained based on the palmprint sample are regarded as the palmprint data corresponding to the same ID.
  • the curve obtained by sequentially connecting the generated first main line anchor point, main line adjustment point and second main line anchor point is used as the palmprint main line, and at least one palmprint sample containing the palmprint main line is obtained.
  • This paper trains the palmprint recognition model. Through the above method, a large number of palmprint samples are simulated based on the distribution of the main lines in the palmprint, so that the generated palmprint samples have stronger diversity. Training the palmprint recognition model based on palmprint samples can break through the limitations of the palmprint dataset and improve the robustness of the palmprint recognition model.
  • the process of obtaining palmprint samples according to region division is described.
  • determine the first area and the second area corresponding to the direction of the main line of the palmprint determine the first data in the first area and the second data in the second area
  • determine the radian law of the main line of the palmprint Determine the third area, and generate adjustment point data in the third area, sequentially connect the first main line anchor point corresponding to the first data, the main line adjustment point and the second main line anchor point corresponding to the second data, and generate a palmprint containing the main line.
  • the distribution law of the palmprint main line and the radian law of the palmprint main line are expressed in a manner of regional division, and then the position information of the first main line anchor point and the second main line anchor point in the palmprint main line can be determined more vividly, thereby Determine the main line adjustment point, connect the first main line anchor point, the main line adjustment point and the second main line anchor point sequentially as the palmprint main line, and then obtain the palmprint samples including the palmprint main line, and in the predetermined disturbance interval
  • slightly perturb the generated palmprint samples for example: perturb any point or any point in the first main line anchor point, the main line adjustment point and the second main line anchor point
  • Stronger multiple palmprint data further improves the diversity of palmprint samples.
  • the palmprint recognition model is trained with at least one palmprint sample.
  • the palmprint recognition model is trained with at least one palmprint sample.
  • Step 1210 acquire a sample image set.
  • At least one sample image is stored in the sample image set.
  • the sample images in the sample image set include various categories, for example: landscape images, architectural images, animal images, plant images, and so on.
  • the sample image set is a large-scale classification image data set, such as: image network (ImageNet) data set.
  • ImageNet image network
  • Step 1220 taking the sample image as the background, nesting the palmprint sample on the sample image to obtain the target image.
  • a plurality of sample images are selected from the sample image set, with the selected sample image as the background, the generated palmprint sample is nested on the selected sample image, and the palmprint sample and the sample image are obtained. target sample.
  • the selected sample image is used as the background to indicate that the selected sample image is placed below; the generated palmprint sample is nested on the sample image to indicate that the palmprint sample is placed on the above.
  • the nesting relationship between the sample image and the palmprint sample is expressed in the form of layers, layer 1 is under layer 2, that is, the sample image is layer 1, and the target sample is layer 2.
  • the color of the main line of the palmprint and the fine lines of the palmprint in the palmprint sample are set to c and the width is w
  • the palmprint sample is placed on the upper layer
  • the samples selected in the sample image set are
  • the image I is placed on the lower layer, that is, the palmprint sample is nested on the sample image I to obtain the target image.
  • the process of nesting to obtain the target image is as follows:
  • S is used to indicate the target image obtained by nesting the palmprint sample (including palmprint main line and palmprint fine lines) on the sample image I; synthesizesize is used to indicate that the palmprint sample is nested on the sample image I to generate The process of the target image; P is used to indicate the main line of the palmprint corresponding to the palmprint sample; Q is used to indicate the fine line of the palmprint corresponding to the palmprint sample.
  • the texture feature information such as the color, length, and width of the palmprint main line and palmprint fine lines corresponding to the palmprint sample is determined.
  • the texture position of the palmprint main line and palmprint fine lines The information is also relatively certain.
  • the nested palmprint sample is the same as the non-nested palmprint sample, that is: nested
  • the texture feature information and texture position information corresponding to the palmprint sample and the non-nested palmprint sample are the same.
  • the nesting process can be different.
  • the size of the sample image is larger than the size of the palmprint sample generation area, the palmprint sample is directly nested on the sample image, or the sample image is reduced to a certain size (such as: the size of the palmprint sample generation area Size), the palmprint sample is nested on the sample image; when the size of the sample image is smaller than the size of the palmprint sample generation area, the palmprint sample is directly nested on the sample image, or the sample image is enlarged After reaching a certain size (such as: the size of the palmprint sample generation area), the palmprint sample is nested on the sample image, etc.
  • At least one palmprint sample is perturbed to obtain the target sample.
  • the target disturbance interval includes a palmprint main line disturbance interval and a palmprint fine line disturbance interval.
  • the palmprint main line disturbance interval is used to indicate the interval range for disturbing the palmprint main line;
  • the palmprint fine line disturbance area is used for indicating the interval range for palmprint fine lines to be disturbed.
  • multiple target samples are obtained.
  • the palmprint main line in the palmprint sample is disturbed to obtain multiple target samples with slight changes in the palmprint main line; or, in the palmprint fine line disturbance interval, the palmprint sample
  • the palmprint fine lines in the palmprint are perturbed to obtain multiple target samples with slight changes in the palmprint fine lines; A target sample with slight changes in the main line of the palmprint and the fine lines of the palmprint, etc.
  • perturbing at least one palmprint sample can be implemented as: adding noise to the palmprint main line corresponding to at least one palmprint sample; or adding noise to the palmprint fine lines corresponding to at least one palmprint sample noise.
  • Pi is used to indicate the palmprint main line in the i-th palmprint sample; It is used to indicate the jth palmprint sample with disturbance noise added on the basis of the palmprint main line; N p is used to indicate the disturbance noise added on the palmprint main line; Q i is used to indicate the i-th palmprint sample palm lines; It is used to indicate the jth palmprint sample with disturbance noise added on the basis of the main line of the palmprint; N q is used to indicate the disturbance noise added to the fine lines of the palmprint.
  • the disturbance noise disturbance noise Both are very fine Gaussian noise.
  • the palmprint main line corresponding to at least one palmprint sample is disturbed to obtain the disturbance main line; in the palmprint fine line disturbance interval, at least one palmprint sample is The corresponding palmprint fine lines are disturbed to obtain the disturbance fine lines; based on the disturbance main line and the disturbance fine lines, the target samples are obtained.
  • the above-mentioned disturbance noise N p is the disturbance interval of the palmprint main line corresponding to the palmprint main line
  • the above-mentioned disturbance noise N q is the palmprint fine-print disturbance interval corresponding to the palmprint fine-print
  • the disturbance noise N p and the disturbance noise N q are collectively referred to as the target perturbation interval.
  • FIG. 13 it is a schematic diagram of multiple sets of palmprint samples obtained after adding disturbance noise to the palmprint samples.
  • the palmprint sample 1310, the palmprint sample 1320, the palmprint sample 1330, and the palmprint sample 1340 are palmprint samples generated based on the method for generating the above-mentioned palmprint samples.
  • the perturbation of the palmprint sample 1310 is taken as an example for illustration.
  • add subtle Gaussian noise to the palmprint main line and palmprint fine lines of the palmprint sample 1310 to obtain the target sample 1311, the target sample 1312 and the target sample 1313, and the target sample 1311, the target sample 1312 and the target Sample 1313 is the palmprint data corresponding to the same identity.
  • the perturbation of the palmprint sample 1320 is an example for illustration.
  • the target perturbation interval add subtle Gaussian noise to the palmprint main line and palmprint fine lines of the palmprint sample 1320 to obtain the target sample 1321, the target sample 1322 and the target sample 1323, and the target sample 1321, the target sample 1322 and the target sample
  • the sample 1323 is the palmprint data corresponding to the same identity.
  • the number of palmprint main lines and palmprint fine lines in the target sample corresponding to the same identity is determined, and slight changes caused by applying disturbance noise within the target disturbance range are allowed, namely:
  • the palmprint data obtained after applying disturbance noise in the target disturbance range is still regarded as the palmprint data of the same identity.
  • the sample image is used as the background, and the target sample is nested on the sample image to obtain the target image.
  • the sample image as the background is used to indicate that the sample image is placed below; nesting the target sample on the sample image is used to indicate that the target sample is placed above.
  • nesting relationship between images is represented by layers, and layer 1 is under layer 2, then the sample image is layer 1; the target sample is layer 2.
  • FIG. 14 it is a schematic diagram of a target image obtained by nesting a target sample on a sample image.
  • the target image 1410 is an image obtained by embedding the target sample 1400 on the landscape image 1411, wherein the landscape image 1411 is the sample image; or, the target image 1420 is obtained by nesting the target sample 1400 on the animal image 1421 images, wherein the animal image 1421 is a sample image.
  • sample images can be images with higher definition or images with lower definition.
  • Step 1230 train the palmprint recognition model with the target image.
  • first training is performed on the palmprint recognition model with the target image to obtain a candidate palmprint recognition model.
  • the target image is used as the input of the palmprint recognition model, and the first training is performed on the palmprint recognition model.
  • the palmprint recognition model learns multiple target images to prevent the palmprint recognition model from overfitting the palmprint main line, palmprint fine lines, etc. in the texture color, texture width, and background content of the palmprint sample.
  • synthesize is used to indicate the process of generating the target image; It is used to indicate the target image obtained by nesting the generated palmprint samples (including palmprint main lines and palmprint fine lines) on the sample image I; It is used to indicate the jth palmprint sample with disturbance noise added on the basis of the main line of the palmprint; It is used to indicate the jth palmprint sample with disturbance noise added on the basis of the main line of palmprint.
  • a palmprint data set is acquired.
  • At least one palmprint data is stored in the palmprint data set, and at least one palmprint data is correspondingly marked with a data label.
  • the palmprint data stored in the palmprint data set is legally authorized palmprint data.
  • the palmprint data corresponds to an annotated data label, which is used to distinguish different palmprint data.
  • palmprint data 1 is the palmprint corresponding to user 1, and user 1 is used as the data label of palmprint data 1; or, palmprint data 2 is the palmprint obtained from the family palmprint database 2, and the family palmprint The database 2 is used as the data label of the palmprint data 1, etc.
  • a second training is performed on the candidate palmprint recognition model with the palmprint data and data labels corresponding to the palmprint data to obtain the target palmprint recognition model.
  • the target palmprint recognition model is a model obtained by training the palmprint recognition model.
  • the generated palmprint samples are used to improve the performance of the model during the training phase of the palmprint recognition model, that is, the palmprint samples or the target images corresponding to the palmprint samples are first trained on the palmprint recognition model to obtain candidate Palmprint recognition model, the candidate palmprint model at this time can better learn the texture information of the generated palmprint samples.
  • the palmprint data and the data label corresponding to the palmprint data are used to perform the second training on the candidate palmprint model, wherein the second The training is used to improve the recognition model of the candidate palmprint model to the real palmprint with the palmprint data possessed by the creature.
  • the training process of performing the first training and the second training on the palmprint model is as follows.
  • Step 1510 generate palmprint samples.
  • the above-mentioned method for generating a palmprint sample is used to obtain a palmprint sample including the main line of the palmprint and the fine lines of the palmprint.
  • the generated palmprint samples can assist the palmprint recognition model to pay attention to the subtle changes in textures such as the main line of the palmprint and the fine lines of the palmprint, and promote the palmprint recognition model to learn more distinguishing features.
  • Step 1520 synthesize target images in batches.
  • the palmprint sample is disturbed to obtain the target sample, and the sample image obtained randomly from the sample image set is used as the background, and the target sample is nested on the sample image to obtain the target image.
  • Step 1530 the first training.
  • a first training is performed on the palmprint recognition model based on the target images.
  • a target image and b target image are input into the palmprint recognition model, so that the palmprint
  • the pattern recognition model learns the palmprint texture information (palmprint main line information, palmprint fine-print information) of palmprint samples corresponding to different identities in different target images.
  • the palmprint recognition model learns the similarity between a target images of identity A, and the similarity between b target images of identity B; in addition, the palmprint recognition model also The difference between the target image and the b target images of the identity mark B is learned, and then the similarity of the palmprint texture information of the palmprint samples corresponding to the same identity mark in different target images is determined, and the correspondence between different identity marks in different target images The difference of palmprint texture information of palmprint samples, etc.
  • a candidate palmprint recognition model is obtained.
  • Step 1540 obtain the public palmprint data set.
  • a public palmprint data set storing multiple palmprint data is obtained, and multiple palmprint data marked with data tags are stored in the palmprint data set.
  • Step 1550 the second training.
  • the palmprint data is input to the candidate palmprint recognition model, based on the output data of the candidate palmprint recognition model and the data label corresponding to the palmprint data, the corresponding loss value of the palmprint data is determined;
  • the candidate palmprint recognition model is trained; in response to the training of the candidate palmprint recognition model reaching the training target, the target palmprint recognition model is obtained.
  • a second training is performed on the candidate palmprint recognition model. For example: calculate the loss value of the output of the palmprint data by the candidate palmprint recognition model and the data label corresponding to the palmprint data.
  • the second training is to realize the process of fine-tuning the candidate palmprint recognition model.
  • the candidate palmprint recognition model outputs the prediction label corresponding to the palmprint data, and determine the loss corresponding to the palmprint data based on the difference between the prediction label corresponding to the palmprint data and the data label value.
  • the data label is a training label, which is the correct label corresponding to the palmprint data
  • the prediction label is a label predicted by the model after data processing of the input data.
  • the purpose of training the model is to let the model learn the similarity between the palmprint data corresponding to the same data label in different palmprint data, and the difference between the palmprint data corresponding to different data labels in different palmprint data, so that the model Finally, it can output the correct label or a label very close to the correct label, and has the ability of palmprint recognition.
  • the target palmprint recognition model will be obtained because the training of the candidate palmprint recognition model reaches the training target.
  • the training target includes at least the following a situation.
  • the candidate palmprint recognition model obtained in the latest iterative training is used as the target palmprint recognition model.
  • the loss value reaching the convergence state is used to indicate that the value of the loss value obtained through the loss function no longer changes or the range of change is smaller than a preset threshold.
  • the loss value corresponding to the nth palmprint data is 0.1
  • the loss value corresponding to the n+1th palmprint data is also 0.1, which can be regarded as the loss value has reached the convergence state.
  • the nth palmprint data or the The candidate palmprint recognition model adjusted by the loss value corresponding to the n+1 palmprint data is used as the target palmprint recognition model to realize the training process of the candidate palmprint recognition model.
  • the candidate palmprint recognition model obtained in the latest iterative training is used as the target palmprint recognition model.
  • one acquisition can obtain a loss value, and the number of acquisitions of the loss value used to train the candidate palmprint recognition model is preset.
  • the number of acquisitions of the loss value is the palmprint The number of data; or, when one palmprint data corresponds to multiple loss values, the number of loss acquisitions is the number of loss values.
  • the threshold of the number of loss value acquisitions is 10 times, that is, when the threshold of acquisition times is reached, the candidate palmprint recognition model with the latest loss value adjustment is used as the target palmprint recognition model,
  • the candidate palmprint recognition model adjusted with the minimum loss value in the 10-time adjustment process of the loss value is used as the target palmprint recognition model to realize the training process of the candidate palmprint recognition model.
  • the palmprint is recognized.
  • FIG. 16 it is a flow chart of recognizing palmprints.
  • a palmprint recognition photo 1610 and a palmprint registration photo 1620 based on the palmprint recognition photo 1610 and palmprint registration photo 1620, detect the palm corresponding to the palmprint, and extract the palmprint interest area 1630;
  • Pattern interest area 1630 is sent to backstage 1640 (as: server), by backstage 1640 palmprint identification photo 1610, palmprint registration photo 1620 and palmprint interest area 1630 are added in the palmprint registration storehouse;
  • background 1640 based on this
  • the terminal target palmprint recognition model recognizes palmprints.
  • the result of the palmprint recognition is displayed on the front end (such as: a terminal).
  • the palmprint recognition result not only includes presentation in the form of "yes” or “no”, but also presentation in numerical representations such as probability.
  • presentation in the form of "yes” or “no” but also presentation in numerical representations such as probability.
  • the table below includes the recognition data of the target palmprint recognition model and the recognition data obtained through other palmprint recognition technologies.
  • Table 1 shows the recognition effect of the target palmprint recognition model and other methods in the field of palmprint recognition on five public datasets.
  • the five public datasets are: CASIA, Institute of Automation, Chinese Academy of Sciences, Indian Institute of Technology Delhi dataset (IITD, Indian Institute of Technology Delhi), Polytechnic University data Collection (PolyU, Polytechnic University), Trinity College Dublin (TCD, Trinity College Dublin) and maintenance technical data (MPD, Maintenance Planning Document).
  • the evaluation indicators are: first accuracy rate (Top-1) and average error probability (EER, Equal Error Rate).
  • the communication protocol (PalmNet) is currently the most advanced method in the field of palm prints, which is used here as a comparison.
  • the curve obtained by sequentially connecting the generated first main line anchor point, main line adjustment point and second main line anchor point is used as the palmprint main line, and at least one palmprint sample containing the palmprint main line is obtained.
  • This paper trains the palmprint recognition model. Through the above method, a large number of palmprint samples are simulated based on the distribution of the main lines in the palmprint, so that the generated palmprint samples have stronger diversity. Training the palmprint recognition model based on palmprint samples can break through the limitations of the palmprint dataset and improve the robustness of the palmprint recognition model.
  • the process of training the palmprint recognition model with at least one palmprint sample is described. First obtain the sample image set, then use the sample image in the sample image set as the background, nest the palmprint sample on the sample image to obtain the target image, and then use the target image to train the palmprint recognition model to obtain the target palmprint recognition Model.
  • the palmprint recognition performance of the target palmprint recognition model in the real scene can be improved, and the use of the target palmprint recognition model will not increase the additional calculation and training burden, which is a simple and effective training optimization plan.
  • Fig. 17 is a structural block diagram of the generation device of the palmprint sample provided by an exemplary embodiment of the present application, as shown in Fig. 17, the device includes the following parts:
  • the anchor point generation module 1710 is used to generate anchor point data according to the palmprint main line distribution rule, and the anchor point data includes first data corresponding to the first main line anchor point and second data corresponding to the second main line anchor point.
  • the adjustment point generation module 1720 is used to generate adjustment point data according to the radian rule of the main line of the palmprint, and the main line adjustment point corresponding to the adjustment point data is used to control the radian of the main line formed by the first main line anchor point and the second main line anchor point.
  • the main line generating module 1730 is used to generate the main line of the palmprint based on the first data, the second data and the adjustment point data.
  • the main line of the palmprint is a curve connecting the first main line anchor point, the main line adjustment point and the second main line anchor point in sequence.
  • the sample generation module 1740 is used to generate at least one palmprint sample including the main line of the palmprint, the palmprint sample is used for training the palmprint recognition model, and the palmprint recognition model is used for palmprint recognition.
  • the positioning point generation module 1710 is also used to determine the first area and the second area corresponding to the direction of the main line of the palmprint according to the distribution law of the main line of the palmprint; determine the location of the first main line in the first area The first data corresponding to the point; the second data corresponding to the second main line positioning point is determined in the second area.
  • the anchor point generation module 1710 is also used to determine the palmprint generation area according to the palmprint main line distribution rule, and the palmprint generation area is used to frame the distribution range of the palmprint main line; within the palmprint generation area Determine the first vertex and the second vertex in a diagonal relationship; take the first vertex as the center, and take the first preset length as the radius, determine the first area in the palmprint generation area; take the second vertex as the center, and take the second vertex as the center.
  • the second preset length is a radius, and the second area is determined in the palmprint generating area.
  • the positioning point generation module 1710 is further configured to determine the first data corresponding to the first main line positioning point in a randomly selected manner in the first area; The method determines the second data corresponding to the second main line anchor point.
  • the adjustment point generation module 1720 is also used to determine the third area based on the positional relationship between the first main line anchor point and the second main line anchor point according to the radian rule of the palmprint main line; within the third area Generate adjustment point data.
  • the adjustment point generation module 1720 is also used to connect the first main line anchor point and the second main line anchor point to obtain the target line segment; centering on the midpoint of the target line segment, the The rectangular area serves as the third area.
  • the palmprint samples also include palmprint fine lines.
  • the sample generation module 1740 is also used to determine at least two palmprint fineline anchor points; generate palmprint finelines based on at least two palmprint fineline anchor points; generate at least one palmprint pattern comprising the main line of the palmprint and the palmprint finelines Book.
  • the sample generating module 1740 is further configured to connect at least two palmprint fineline positioning points to obtain palmprint finelines.
  • the sample generation module 1740 is further configured to determine a palmline adjustment point based on at least two palmline positioning points, and the palmline adjustment point is used to control at least two palmline adjustment points.
  • the device further includes:
  • An acquisition module 1750 configured to acquire a sample image set, where at least one sample image is stored in the sample image set;
  • Nesting module 1760 for taking the sample image as the background, the palmprint sample is nested on the sample image to obtain the target image;
  • the training module 1770 is used for training the palmprint recognition model with the target image.
  • the nesting module 1760 is also used to perturb at least one palmprint sample within the target perturbation interval to obtain the target sample; with the sample image as the background, the target sample is nested between the sample images to get the target image.
  • the target disturbance interval includes a palmprint main line disturbance interval and a palmprint fine line disturbance interval.
  • the nesting module 1760 is also used to disturb the palmprint main line corresponding to at least one palmprint sample in the palmprint main line disturbance interval to obtain the disturbed main line;
  • the fine lines of palm prints are perturbed to obtain the disturbed fine lines; based on the disturbed main line and the disturbed fine lines, the target samples are obtained.
  • the nesting module 1760 is further configured to add noise to the palmprint main line corresponding to at least one palmprint sample.
  • the nesting module 1760 is further configured to add noise to the palmprint fine lines corresponding to at least one palmprint sample.
  • the training module 1770 is also used to perform the first training on the palmprint recognition model with the target image to obtain a candidate palmprint recognition model; obtain a palmprint data set, and at least one palmprint recognition model is stored in the palmprint data set.
  • the palmprint data at least one palmprint data is correspondingly marked with a data label; with the palmprint data and the data label corresponding to the palmprint data, the candidate palmprint recognition model is trained for the second time to obtain the target palmprint recognition model, the target palmprint recognition model It is the model trained for the palmprint recognition model.
  • the training module 1770 is also used to input the palmprint data into the candidate palmprint recognition model, based on the output data of the candidate palmprint recognition model and the data label corresponding to the palmprint data, determine the corresponding A loss value; training the candidate palmprint recognition model with the loss value; in response to the training of the candidate palmprint recognition model reaching the training target, the target palmprint recognition model is obtained.
  • the first main line anchor point and the second main line anchor point are generated;
  • the curve obtained after the second main line anchor points are connected sequentially is used as the main line of the palmprint, and at least one palmprint sample containing the main line of the palmprint is generated, and the palmprint recognition model is trained with the palmprint samples.
  • a plurality of palmprint samples are simulated, because the palmprint samples are determined by means of generating data (the first main line anchor point, the second main line anchor point and the adjustment point data) , so the generated palmprint samples are in large batches, and there is no upper limit on the number, so that the generated palmprint samples have a stronger diversity.
  • it can prompt the palmprint recognition model to mine more texture internal laws and information that are not involved in the palmprint data set, break through the limitations of the palmprint data set, and improve Robustness of Palmprint Recognition Models.
  • the generation device of the palmprint sample provided by the above-mentioned embodiment is only illustrated with the division of the above-mentioned functional modules.
  • the above-mentioned function distribution can be completed by different functional modules as required, that is, the The internal structure of the system is divided into different functional modules to complete all or part of the functions described above.
  • the device for generating a palmprint sample provided by the above-mentioned embodiment and the embodiment of the method for generating a palmprint sample belong to the same idea, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.
  • Fig. 19 shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application.
  • the server 1900 includes a central processing unit (Central Processing Unit, CPU) 1901, a system memory 1904 including a random access memory (Random Access Memory, RAM) 1902 and a read only memory (Read Only Memory, ROM) 1903, and a connection system memory 1904 and the system bus 1905 of the central processing unit 1901.
  • Server 1900 also includes mass storage device 1906 for storing operating system 1913 , application programs 1914 and other program modules 1915 .
  • Mass storage device 1906 is connected to central processing unit 1901 through a mass storage controller (not shown) connected to system bus 1905 .
  • Mass storage device 1906 and its associated computer-readable media provide non-volatile storage for server 1900 . That is, mass storage device 1906 may include computer-readable media (not shown) such as hard disks or Compact Disc Read Only Memory (CD-ROM) drives.
  • CD-ROM Compact Disc Read Only Memory
  • Computer-readable media may comprise computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (Erasable Programmable Read Only Memory, EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassette, tape, magnetic disk storage or other magnetic storage device.
  • the server 1900 can also run on a remote computer connected to the network through a network such as the Internet. That is to say, the server 1900 can be connected to the network 1912 through the network interface unit 1911 connected to the system bus 1905, or can use the network interface unit 1911 to connect to other types of networks or remote computer systems (not shown).
  • the above-mentioned memory also includes one or more programs, one or more programs are stored in the memory and configured to be executed by the CPU.
  • the embodiment of the present application also provides a computer device, the computer device includes a processor and a memory, at least one instruction, at least one section of program, code set or instruction set are stored in the memory, at least one instruction, at least one section of program, code The set or instruction set is loaded and executed by the processor to realize the methods for generating palmprint samples provided by the above method embodiments.
  • Embodiments of the present application also provide a computer-readable storage medium, on which at least one instruction, at least one program, code set or instruction set is stored, at least one instruction, at least one program, code set or The instruction set is loaded and executed by the processor, so as to realize the methods for generating palmprint samples provided by the above method embodiments.
  • Embodiments of the present application also provide a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for generating a palmprint sample described in any one of the above embodiments.
  • the computer-readable storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a solid-state hard drive (SSD, Solid State Drives) or an optical disc, etc.
  • random access memory may include resistive random access memory (ReRAM, Resistance Random Access Memory) and dynamic random access memory (DRAM, Dynamic Random Access Memory).
  • ReRAM resistive random access memory
  • DRAM Dynamic Random Access Memory
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

本申请公开了一种掌纹样本的生成方法、装置、设备、介质及程序产品,涉及机器学习领域。该方法包括:根据掌纹主线分布规律生成定位点数据(步骤210);根据掌纹主线弧度规律生成调节点数据(步骤220);基于第一数据、第二数据和调节点数据生成掌纹主线(步骤230);生成包含掌纹主线的至少一个掌纹样本(步骤240)。本申请可应用于云技术、人工智能、智慧交通等各种场景。

Description

掌纹样本的生成方法、装置、设备、介质及程序产品
本申请要求于2022年02月28日提交中国专利局,申请号为202210189742.8,申请名称为“掌纹样本的生成方法、装置、设备、介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及机器学习领域,特别涉及一种掌纹样本的生成方法、装置、设备、介质及程序产品。
背景技术
随着信息技术的飞速发展,掌纹识别技术因其可靠性以及便捷性,在各种身份认证场景中得到越来越广泛的应用。掌纹识别根据手掌中的主线、纹理、皱纹等特征进行身份识别,相较面部识别,属于一种非侵犯性的识别方法,更容易为用户所接受。
相关技术中,在对掌纹进行识别时,通常采用基于深度学习的技术方案,学习已存储的掌纹图像上掌纹信息的内在规律,促使模型学习到具有区分力的潜在特征,并利用训练得到的模型对掌纹进行分析,从而进行身份信息识别过程。
然而,在通过上述深度学习方法进行身份信息识别时,深度网络的模型通常依赖于大批量的掌纹图像集以及准确的标注信息,而掌纹信息具有较强的隐私性和安全性,使得掌纹识别领域缺乏大量的公共数据集供模型进行学习,使得模型对身份信息的识别效果较差。
发明内容
本申请实施例提供了一种掌纹样本的生成方法、装置、设备、介质及程序产品。
一方面,提供了一种掌纹样本的生成方法,由计算机设备执行,所述方法包括:
根据掌纹主线分布规律生成定位点数据,所述定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据;
根据掌纹主线弧度规律生成调节点数据,所述调节点数据对应的主线调节点用于控制所述第一主线定位点和所述第二主线定位点所构成的主线的弧度;
基于所述第一数据、所述第二数据和所述调节点数据生成掌纹主线,所述掌纹主线为依次连接所述第一主线定位点、所述主线调节点和所述第二主线定位点的曲线;及
生成包含所述掌纹主线的至少一个掌纹样本,所述掌纹样本用于对掌纹识别模型进行训练,所述掌纹识别模型用于进行掌纹识别。
另一方面,提供了一种掌纹样本的生成装置,所述装置包括:
定位点生成模块,用于根据掌纹主线分布规律生成定位点数据,所述定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据;
调节点生成模块,用于根据掌纹主线弧度规律生成调节点数据,所述调节点数据对应的主线调节点用于控制所述第一主线定位点和所述第二主线定位点所构成的主线的弧度;
主线生成模块,用于基于所述第一数据、所述第二数据和所述调节点数据生成掌纹主线,所述掌纹主线为依次连接所述第一主线定位点、所述主线调节点和所述第二主线定位点的曲线;及
样本生成模块,用于生成包含所述掌纹主线的至少一个掌纹样本,所述掌纹样本用于对掌纹识别模型进行训练,所述掌纹识别模型用于进行掌纹识别。
另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述本申请实施例中任一所述掌纹样本的生成方法。
另一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、 至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述本申请实施例中任一所述的掌纹样本的生成方法。
另一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述实施例中任一所述的掌纹样本的生成方法。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个示例性实施例提供的实施环境示意图;
图2是本申请一个示例性实施例提供的掌纹样本的生成方法的流程图;
图3是本申请一个示例性实施例提供的手掌掌纹的示意图;
图4是本申请一个示例性实施例提供的脚掌掌纹的示意图;
图5是本申请一个示例性实施例提供对手掌掌纹进行区域划分的示意图;
图6是本申请一个示例性实施例提供的贝塞尔曲线示意图;
图7是本申请另一个示例性实施例提供的掌纹样本的生成方法的流程图;
图8是本申请一个示例性实施例提供的确定感兴趣区域的示意图;
图9是本申请一个示例性实施例提供的第一区域和第二区域示意图;
图10是本申请一个示例性实施例提供的第三区域的示意图;
图11是本申请一个示例性实施例提供的确定第三区域的示意图;
图12是本申请另一个示例性实施例提供的掌纹样本的生成方法的流程图;
图13是本申请一个示例性实施例提供的掌纹样本示意图;
图14是本申请一个示例性实施例提供的目标图像示意图;
图15是本申请一个示例性实施例提供的掌纹识别模型训练的流程图;
图16是本申请一个示例性实施例提供的进行掌纹识别过程的流程图;
图17是本申请一个示例性实施例提供的掌纹样本的生成装置的结构框图;
图18是本申请另一个示例性实施例提供的掌纹样本的生成装置的结构框图;
图19是本申请一个示例性实施例提供的服务器的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
相关技术中,在对掌纹进行识别时,通常采用基于深度学习的技术方案,学习已存储的掌纹图像上掌纹信息的内在规律,促使模型学习到具有区分力的潜在特征,并利用训练得到的模型对掌纹进行分析,从而进行身份信息识别过程。然而,在通过上述深度学习方法进行身份信息识别时,深度网络的模型通常依赖于大批量的掌纹图像集以及准确的标注信息,而掌纹信息具有较强的隐私性和安全性,使得掌纹识别领域缺乏大量的公共数据集供模型进行学习,使得模型对身份信息的识别效果较差。
本申请实施例中,提供了一种掌纹样本的生成方法,使得生成的掌纹样本之间具有更强的多样性,进而提升掌纹样本所训练的掌纹识别模型的鲁棒性。针对本申请训练得到的 掌纹样本的生成方法,在应用时包括如下场景中的至少一种。
一、掌纹识别模型训练场景下
鉴于掌纹数据的隐私性,以及掌纹数据获取方式的复杂性,掌纹数据库中存储的掌纹数据较少,当基于掌纹数据库中的掌纹数据对掌纹识别模型进行训练时,较难达到较好的训练效果。示意性的,采用上述掌纹样本的生成方法,根据掌纹主线分布规律生成定位点数据,根据掌纹主线弧度规律生成调节点数据,以定位点数据和调节点数据确定多条掌纹主线,进而得到包含掌纹主线的多个掌纹样本,进而在通过掌纹样本对掌纹识别模型进行训练时,使得掌纹识别模型能够学习更多样的掌纹特征,提高掌纹识别模型在掌纹识别过程中的准确性。
二、掌纹加密场景下
示意性的,以手掌掌纹为例,掌纹纹理可能因为手掌不同的伸展形状、拍摄时的光照变化、拍摄设备造成的噪声等参数,而得到不同的掌纹纹理图像。当在不同时刻,将同一个手掌放置在掌纹加密的仪器上时,可能会出现判断失误的情况。示意性的,采用上述掌纹样本的生成方法,根据掌纹主线分布规律生成定位点数据,根据掌纹主线弧度规律生成调节点数据,以定位点数据和调节点数据确定多条掌纹主线,进而得到包含掌纹主线的多个掌纹样本,将具有多样性的多个掌纹样本作为识别标准,可以得到更多种情况下掌纹样本的显示方式,进而较大程度地克服掌纹数量较少而导致的识别难度较大的问题,实现以更细颗粒度对掌纹进行分析的过程。
值得注意的是,上述应用场景仅为示意性的举例,本实施例提供的掌纹样本的生成方法还可以应用于其他场景中,本申请实施例对此不加以限定。
需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的掌纹数据都是在充分授权的情况下获取的。
其次,对本申请实施例中涉及的实施环境进行说明,示意性的,请参考图1,该实施环境中涉及终端110、服务器120,终端110和服务器120之间通过通信网络130连接。
在一些实施例中,终端110中安装有具有掌纹数据获取功能的应用程序。在一些实施例中,终端110用于向服务器120发送掌纹数据。其中,掌纹数据既包括掌纹对应的图像数据、也包括掌纹对应的纹理数据等。服务器120可根据掌纹数据,确定掌纹主线分布规律以及掌纹主线弧度规律等数据信息,并基于掌纹主线分布规律以及掌纹主线弧度规律,根据掌纹识别模型121对掌纹进行识别,可选地,将对掌纹识别后的掌纹识别结果呈现至终端110上。
其中,掌纹识别模型121采用如下方法训练得到的:根据掌纹主线分布规律,生成包括代表第一主线定位点对应的第一数据,以及代表第二主线定位点对应的第二数据;根据掌纹主线弧度规律生成控制主线弧度的调节点数据;将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并生成包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练,上述过程是掌纹识别模型121训练过程的不唯一情形的举例。
值得注意的是,上述终端包括但不限于手机、平板电脑、便携式膝上笔记本电脑、智能语音交互设备、智能家电、车载终端等移动终端,也可以实现为台式电脑等;上述服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数 据和人工智能平台等基础云计算服务的云服务器。
其中,云技术(Cloud technology)是指在广域网或局域网内将硬件、应用程序、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。云技术基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。
在一些实施例中,上述服务器还可以实现为区块链系统中的节点。
可以理解,上述实施环境仅为示意性的举例。本申请提供的掌纹样本的生成方法具体可以应用于计算机设备,该计算机设备可以是终端或服务器,该方法可以由终端或服务器自身单独执行,也可以通过终端和服务器之间的交互来实现。
在本申请提供的掌纹样本的生成方法中,根据掌纹主线分布规律生成第一主线定位点以及第二主线定位点,根据掌纹主线弧度规律生成控制主线弧度的调节点数据,将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并生成包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练。通过上述方法,以掌纹中主线的分布情况,模拟得到多个掌纹样本,由于掌纹样本是通过生成数据(第一主线定位点、第二主线定位点以及调节点数据)的方式确定的,因而生成的掌纹样本是大批量的,其数量可以不设上限,使得生成的掌纹样本具有更强的多样性。在基于生成的掌纹样本对掌纹识别模型进行训练时,可以促使掌纹识别模型挖掘到更多掌纹数据集中不涉及的纹理内在规律与信息,突破掌纹数据集的局限性,提升掌纹识别模型的鲁棒性。
结合上述名词简介和应用场景,对本申请提供的掌纹样本的生成方法进行说明,以该方法应用于服务器为例,如图2所示,该方法包括如下步骤210至步骤240。
步骤210,根据掌纹主线分布规律生成定位点数据。
其中,定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据。
掌纹主线分布规律用于指示掌纹中主线的分布情况。可选地,基于对大量生物本身所具有的手掌掌纹进行分析后,确定手掌掌纹主要包括掌纹主线和掌纹细纹,其中,手掌掌纹的普遍特征包括如下至少一种:(1)掌纹主线的分布情况较为确定,掌纹细纹的分布情况较为随机;(2)掌纹主线在掌纹中通常具有更长、更粗、更深的纹理特征,掌纹细纹相较于掌纹主线而言,具有更细、更短、更浅的纹理特征。
可选地,当掌纹为手掌掌纹时,掌纹主线的分布情况通常呈现为对角关系,即:手掌的掌纹主线分布规律为对角规律。示意性的,以左手手掌为例,掌纹主线一般起始于左上角、结束于右下角;以右手手掌为例,掌纹主线一般起始于右上角、结束于左下角。如图3所示,为左手手掌的掌纹示意图,其中,掌心区域310中包括主线320以及细纹330,较粗的线用于指示主线320,较细的线用于指示细纹330,即:掌心区域310中包括三条主线320以及13条细纹330。
可选地,当掌纹为脚掌掌纹时,掌纹主线的分布情况通常呈现为多种人字形纹、龟形纹、竖纹等多种掌纹形式,即:脚掌的掌纹主线分布规律可以对照几种常见形式进行确定。
示意性的,以脚掌中的人字形纹为例,当人字形纹的主线为两条时,两条主线一般起始于上方并呈现交叉或连接形式。如图4所示,为一个脚掌示意图,该脚掌中包括人字形纹,该人字形纹包括两条主线,两条主线于上方交叉,且第一条主线410结束于左下角,第二条主线420结束于右下角。可选地,当人字形纹的主线为一条时,该条主线起始于左 下角并结束于右下角,其中,主线的弯曲程度较大,且与主线的起始点和终止点呈现正“人”字形或者倒“人”字形;或者,该条主线起始于上方并结束于下方,其中,主线的弯曲程度较大,且与主线的起始点和终止点呈现侧向放置的“人”字形等。
示意性的,以脚掌中的竖纹为例,竖纹的主线一般包括至少一条,主线一般起始于上方并结束于下方等。值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
可选地,定位点数据用于指示主线的固定情况,包括第一数据和第二数据。基于第一数据和第二数据,确定主线的起始情况和终止情况,并大致确定主线的分布情况。示意性的,第一数据对应第一主线定位点;第二数据对应第二主线定位点。
在一个可选的实施例中,将掌纹主线的起始点作为第一主线定位点,将掌纹主线的终止点作为第二主线定位点。示意性的,定位点数据的生成包括如下至少一种方式。
(1)随机生成方式
示意性的,在任一坐标区域内,以随机生成的方式生成第一数据以及第二数据。依据掌纹主线的长度限制,将该第一主线定位点与第二主线定位点之间连接的线段与该坐标区域进行等比例缩放,进而确定第一数据对应的第一主线定位点,以及第二数据对应的第二主线定位点。
或者,根据掌纹主线分布规律,确定掌纹主线的分布范围。例如:成人的手掌大致为16~22厘米,掌纹主线大致分布在手掌的掌心区域,成人手掌的掌心区域大致为8~12厘米。以成人手掌的掌心区域的大小为例进行分析。预先设定掌纹主线的分布区域,该分布区域的大小既可以为边长为8厘米的正方形区域,也可以为边长为6厘米的矩形区域,还可以为对角线为10厘米的菱形区域等。可选地,在该预先设定的掌纹主线的分布区域内,以随机生成的方式生成第一数据对应的第一主线定位点,以及第二数据对应的第二主线定位点。
(2)在划分区域内的生成方式
可选地,以预先设定的掌纹主线的分布区域为例进行说明,在该掌纹主线的分布区域内,对该分布区域进行区域划分,得到划分区域,在划分区域内,以随机生成的方式生成第一数据以及第二数据。示意性的,对该分布区域进行区域划分后,得到两个划分区域,在第一个划分区域内生成第一数据对应的第一主线定位点,在第二个划分区域内生成第二数据对应的第二主线定位点。
可选地,对分布区域进行区域划分后得到多个划分区域,多个划分区域的区域总和既可以实现为全部分布区域,也可以实现为部分分布区域,即:生成定位点数据的划分区域可以包含全部分布区域,也可以仅包括部分分布区域等。
示意性的,如图5所示,以左手手掌为例进行说明。将左手手掌510作为掌纹主线的分布区域,对该分布区域进行划分后,得到四个划分区域,分别为:左上角区域520、左下角区域530、右上角区域540以及右下角区域550。通常情况下,在左手手掌中,掌纹主线的起始点(第一主线定位点)位于左上角区域520,掌纹主线的终止点(第二主线定位点)位于右下角区域550,故将左上角区域520作为生成第一数据的划分区域,将右下角区域550作为生成第二数据的划分区域。
以上仅为示意性的举例,本申请实施例对此不加以限定。
步骤220,根据掌纹主线弧度规律生成调节点数据。
其中,调节点数据对应的主线调节点用于控制第一主线定位点和第二主线定位点所构成的主线的弧度。
掌纹主线弧度规律用于指示掌纹中主线的弧度情况。示意性的,掌纹主线通常并非是笔直的线段,而是具有一定弧度的曲线,在确定第一主线定位点和第二主线定位点后,通过生成的主线调节点,对第一主线定位点和第二主线定位点所构成主线的弧度进行调节。
在一个可选的实施例中,根据掌纹主线弧度规律,在第一主线定位点与第二主线定位点之间的区域,确定调节点数据。
示意性的,采用贝塞尔曲线对掌纹的几何外观进行参数化描述。可选地,使用至少一条贝塞尔曲线对手掌掌纹的主线进行描述。
其中,贝塞尔曲线(Bezier curve)是应用于二维图形应用程序的数学曲线。贝塞尔曲线由线段与节点组成,节点是可拖动的支点,线段类似可伸缩的皮筋,在对线段的形状进行控制时,通过节点控制线段的弧度,得到对应的曲线。
可选地,以任意一条掌纹主线为例进行说明,采用二阶贝塞尔曲线构成掌纹主线,即:在二维(2D,2-Dimensional)平面中采用三个数据(参数点)完成对一条掌纹主线(贝塞尔曲线)的确定。其中,三个数据分别为代表第一主线定位点的第一数据、主线调节点以及代表第二主线定位点的第二数据。
可选地,如图6所示,为采用贝塞尔曲线方法确定掌纹主线的示意图。横轴与纵轴围成的区域为掌纹主线的生成区域,横轴与纵轴上标注的数字用于辅助对三个数据的坐标位置进行确定。其中,该示意图中包括三条掌纹主线,每条掌纹主线通过第一数据、主线调节点以及第二数据进行确定,“倒三角符号”用于指示第一数据对应的第一主线定位点;“星形符号”用于指示主线调节点;“圆形符号”用于指示第二数据对应的第二主线定位点。
示意性的,首先生成第一数据对应的第一主线定位点以及第二数据对应的第二主线定位点,之后,在第一主线定位点以及第二主线定位点之间,生成主线调节点。可选地,基于第一主线定位点以及第二主线定位点之间的坐标区域的限制关系,生成主线调节点。
例如:掌纹主线610的第一主线定位点的坐标为(0.0,0.4)、主线调节点的坐标为(0.5,0.6)、第二主线定位点的坐标为(0.6,1.0);掌纹主线620的第一主线定位点的坐标为(0.0,0.0)、主线调节点的坐标为(0.7,0.3)、第二主线定位点的坐标为(1.0,1.0);掌纹主线630的第一主线定位点的坐标为(0.4,0.0)、主线调节点的坐标为(0.6,0.2)、第二主线定位点的坐标为(1.0,0.3)。
以上仅为示意性的举例,本申请实施例对此不加以限定。
步骤230,基于第一数据、第二数据和调节点数据生成掌纹主线。
其中,掌纹主线为依次连接第一主线定位点、主线调节点和第二主线定位点的曲线。
示意性的,如图6所示,掌纹主线610是将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的,使得掌纹主线610呈现为向上较大幅度凸出的弧形曲线;掌纹主线620是将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的,使得掌纹主线620呈现为向上较小幅度凸出的弧形曲线;掌纹主线630是将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的,使得掌纹主线630呈现为向下凹入的弧形曲线。
步骤240,生成包含掌纹主线的至少一个掌纹样本。
其中,掌纹样本用于对掌纹识别模型进行训练,掌纹识别模型用于进行掌纹识别。
示意性的,在一个掌纹样本中包括至少一条掌纹主线,例如:基于对生物本身所具有的掌纹数据进行观测,掌纹主线的数量一般为2~5条,即:以生物本身所具有的掌纹情况为生成标准时,通常而言,一个掌纹样本中包括两条掌纹主线;或者,一个掌纹样本中包括三条掌纹主线;或者,一个掌纹样本中包括四条掌纹主线;或者,一个掌纹样本中包括五条掌纹主线。
在一个可选的实施例中,基于上述通过定位点数据以及主线调节点生成掌纹主线的方法,得到至少一条掌纹主线后,采用相同的掌纹主线生成方法,生成多条掌纹主线。
可选地,多条掌纹主线所对应的定位点数据既可以相同,也可以不同。例如:掌纹主线1和掌纹主线2对应的第一主线定位点均为A点,但掌纹主线1的第二主线定位点为 B点,掌纹主线2的第二主线定位点为C点;或者,掌纹主线1和掌纹主线2对应的第二主线定位点均为C点,但是掌纹主线1的第一主线定位点为A点,掌纹主线2的第一主线定位点为B点;或者,掌纹主线1和掌纹主线2对应的第一主线定位点均为A点且第二主线定位点均为B点,但掌纹主线1的主线调节点为C点,掌纹主线2的主线调节点为D点等。示意性的,从生成的多条掌纹主线中,随机选取2~5条的掌纹主线,得到掌纹样本。
在一个可选的实施例中,以一个掌纹样本中包括三条掌纹主线为例进行说明。在该掌纹样本中,除包括三条掌纹主线外,还包括掌纹细纹,掌纹细纹相较于掌纹主线,具有更短、更浅的纹理特征。示意性的,对掌纹细纹的生成过程进行说明。
可选地,确定至少两个掌纹细纹定位点;基于至少两个掌纹细纹定位点,生成掌纹细纹。
其中,掌纹细纹定位点用于确定细纹的生成范围,示意性的,根据掌纹细纹的分布规律,生成至少两个掌纹细纹定位点。
可选地,在掌纹细纹的分布规律中,包括掌纹细纹的长度规律、粗度规律、密度规律等多种分布规律。
示意性的,掌纹细纹的长度规律,用于指示掌纹细纹的长度限制,例如:掌纹细纹的长度小于多条掌纹主线中最短的掌纹主线;或者,掌纹细纹的长度小于预设长度阈值(如:3厘米)等。
示意性的,掌纹细纹的粗度规律,用于指示掌纹细纹的粗度限制,例如:掌纹细纹的粗度小于多条掌纹主线中最细的掌纹主线;或者,掌纹细纹的粗度小于预设粗度阈值(如:1毫米)等。
示意性的,掌纹细纹的密度规律,用于指示至少两条掌纹细纹在掌纹生成区域内的相互分布情况,例如:在掌纹生成区域内预先确定的X区域(预设区域)内,规定生成至少3条掌纹细纹;或者,将掌纹生成区域划分为单位长度(1厘米)的若干子区域,规定每个子区域中都应有至少两条掌纹细纹等。
值得注意的是,以上多种分布规律既可以单独应用,也可以结合应用,例如:只采用长度规律确定掌纹细纹;或者,综合考虑长度规律、粗度规律以及密度规律,确定掌纹细纹等。以上仅为示意性的举例,本申请实施例对此不加以限定。
可选地,在掌纹分布中,掌纹细纹的分布较为分散和随机,基于掌纹细纹的分布规律以及掌纹数据库中存储的掌纹数据的掌纹分布情况,采用如下至少一种方法,在掌纹生成区域内生成至少一个掌纹细纹。
(1)确定至少一个掌纹细纹定位点后,基于掌纹细纹的分布规律,确定其余至少一个掌纹细纹定位点。
示意性的,预先确定掌纹细纹的预设长度阈值为3厘米,掌纹细纹的预设粗度阈值为1毫米。在掌纹生成区域内,随机生成一个掌纹细纹定位点,并在掌纹细纹的预设长度阈值以及预设粗度阈值内,确定至少一个其余掌纹细纹定位点,得到至少两个掌纹细纹定位点。可选地,以至少一个其余掌纹细纹定位点为基准,在掌纹细纹的预设长度阈值以及预设粗度阈值内,再确定其余掌纹细纹定位点等。
(2)基于掌纹细纹的分布规律,随机确定至少两个掌纹细纹定位点。
示意性的,在掌纹生成区域内,基于掌纹细纹的分布规律,随机生成至少两个点作为至少两个掌纹细纹定位点;或者,对掌纹生成区域进行划分后,得到至少两个子区域,在子区域内确定用于生成掌纹细纹的掌纹细纹定位点。
可选地,在得到至少两个掌纹细纹定位点后,得到掌纹细纹的方式包括如下至少一种。
1、连接至少两个掌纹细纹定位点,得到掌纹细纹。
示意性的,在得到生成的至少两个掌纹细纹定位点后,连接任意两个掌纹细纹定位点, 得到线段形式的掌纹细纹;或者,连接任意多个掌纹细纹定位点后,得到不规则线段形状的掌纹细纹;或者,在考虑细纹长度较短的条件下,将任意多个(两个或者多个)掌纹细纹定位点作为一组细纹定位点组,在一定长度范围内,得到掌纹细纹等。
2、根据至少两个掌纹细纹定位点生成的掌纹细纹调节点,确定至少一个掌纹样本。
在一个可选的实施例中,基于至少两个掌纹细纹定位点,确定掌纹细纹调节点。
其中,掌纹细纹调节点用于控制至少两个掌纹细纹定位点之间的弧度。示意性的,在生成掌纹细纹时,采用贝塞尔曲线的方法对掌纹细纹进行确定。即:在生成至少两个掌纹细纹定位点后,确定调节至少两个掌纹细纹定位点之间线段弧度的掌纹细纹调节点,通过对掌纹细纹调节点进行位置移动的过程,得到掌纹细纹调节点在不同位置时对应的不同掌纹细纹,如:呈现为弧度较大的弧线形式,或者呈现为弯曲幅度较小的不规则曲线形式等。
在一个可选的实施例中,在预设的掌纹细纹数量范围内,基于至少两个掌纹细纹定位点和掌纹细纹调节点,确定掌纹细纹。
可选地,为了使生成的掌纹样本中的掌纹情况与生物所具有的掌纹情况相似,对掌纹主线以及掌纹细纹的数量进行预先设定。示意性的,以一定掌心区域内的观测结果为例进行说明,生物所具有的掌纹情况中,在掌心区域内,掌纹主线的数量为2至5条,掌纹细纹的数量为5至15条。例如:预先设定掌纹主线数量范围为2至5条,预先设定掌纹细纹数量范围为5至15条,在确定掌纹主线时,将掌纹主线的数量控制在2至5条的数量范围内,得到至多四种情况的掌纹主线;在确定掌纹细纹时,将掌纹细纹的数量控制在5至15条的数量范围内,得到至多十一种情况的掌纹细纹。
在一个可选的实施例中,在预设的掌纹数量范围内,生成包含掌纹主线和掌纹细纹的至少一个掌纹样本。
其中,掌纹数量范围包括掌纹主线数量范围和掌纹细纹数量范围中的至少一种。可选地,在掌纹样本中包括一定数量的掌纹主线和掌纹细纹,其中,当基于生物所具有的掌纹情况得到掌纹样本时,掌纹样本中掌纹主线和掌纹细纹的数量与生物所具有的掌纹主线和掌纹细纹的数量相似。
示意性的,在一定掌心区域内,控制掌纹主线的数量为2至5条,掌纹细纹的数量为5至15条,得到多个掌纹样本。例如:第一个掌纹样本中掌纹主线的数量为3条、掌纹细纹的数量为12条;第二个掌纹样本中掌纹主线的数量为5条、掌纹细纹的数量为10条;第三个掌纹样本中掌纹主线的数量为4条、掌纹细纹的数量为5条等。
在一个可选的实施例中,生成的掌纹样本中仅包括掌纹主线,以不同掌纹主线的走向以及多个掌纹主线之间的分布关系确定不同的掌纹样本。其中,掌纹主线的走向用于指示第一主线定位点、主线调节点以及第二主线定位点之间的关系;掌纹主线之间的分布关系用于指示同属一个掌纹样本中多个掌纹主线之间的关系(如:交叉关系、平行关系、距离关系等)。
可选地,考虑到掌纹分布情况中,手掌姿态、拍摄角度等因素均会使得最终成像的同一只手掌的不同照片上的掌纹产生轻微差异。示意性的,向生成的掌纹样本上添加轻微的扰动,将增加轻微扰动后的掌纹样本视为同一身份标识对应的掌纹数据。即:将在目标扰动区间内对掌纹样本进行扰动后得到的多个目标样本,视为同一个身份标识(ID,Identity Document)对应的掌纹数据。
可选地,预先确定轻微扰动的扰动区间,将在扰动区间内对掌纹样本进行的扰动作为轻微扰动,其中,对掌纹样本进行扰动包括如下至少一种实现方式。
(1)对掌纹样本中的掌纹主线进行扰动
其中,掌纹样本中的掌纹主线为一条将第一主线定位点、主线调节点以及第二主线定位点依次连接形成的平滑曲线,在对掌纹样本中的掌纹主线进行扰动时,既包括在扰动区间内,对掌纹主线中的第一主线定位点、主线调节点以及第二主线定位点中的任意一点进 行扰动;也包括在扰动区间内,对掌纹主线中的第一主线定位点、主线调节点以及第二主线定位点中的任意两点进行扰动;还包括在扰动区间内,对掌纹主线中的第一主线定位点、主线调节点以及第二主线定位点同时进行扰动等。
可选地,预设的扰动区间包括第一主线定位点的扰动区间X、主线调节点的扰动区间Y以及第二主线定位点的扰动区间Z,扰动区间X、扰动区间Y以及扰动区间Z的预设扰动范围既可以相同,也可以不同。
(2)对掌纹样本中的掌纹细纹进行扰动
其中,掌纹细纹既包括由两个掌纹细纹定位点构成的直线,也包括由掌纹细纹定位点和细纹调节点构成的曲线。当掌纹细纹为由两个掌纹细纹定位点构成的直线时,对掌纹样本中的掌纹细纹进行扰动的过程,实现为在扰动区间内,对掌纹细纹中掌纹细纹定位点中的任意一点进行扰动,或者对掌纹细纹中掌纹细纹定位点同时进行扰动;当掌纹细纹为由掌纹细纹定位点和细纹调节点构成的曲线时,对掌纹样本中的掌纹细纹进行扰动的过程,实现为在扰动区间内,对掌纹细纹中的掌纹细纹定位点中的任意一点进行扰动,或者,在扰动区间内,对掌纹细纹中的细纹调节点进行扰动,或者,在扰动区间内,对掌纹细纹中的掌纹细纹定位点以及细纹调节点同时进行扰动等。
(3)对掌纹样本中的掌纹主线和掌纹细纹进行扰动
其中,掌纹样本中的掌纹主线为一条将第一主线定位点、主线调节点以及第二主线定位点依次连接形成的平滑曲线,掌纹细纹既包括由两个掌纹细纹定位点构成的直线,也包括由掌纹细纹定位点和掌纹调节点构成的曲线。
在对掌纹样本中的掌纹主线和掌纹细纹进行扰动时,实现为在扰动区间内,对掌纹主线中的第一主线定位点、主线调节点以及第二主线定位点中的任意一点或多点进行扰动的同时,对掌纹细纹中的掌纹细纹定位点以及细纹调节点中的任意一点或多点进行扰动。
可选地,基于上述在扰动区间范围内,对掌纹主线以及掌纹细纹的扰动过程,得到多个掌纹样本对应的扰动后的掌纹样本,将多个扰动后的掌纹样本与未扰动的掌纹样本,视为同一个ID对应的掌纹数据。
例如:在扰动区间范围内,对掌纹样本A采用上述扰动方法进行轻微扰动,得到对掌纹样本A中的掌纹主线进行扰动后的掌纹样本B、掌纹样本C,以及对掌纹样本A中的掌纹主线以及掌纹细纹进行扰动后的掌纹样本D,将掌纹样本A、掌纹样本B、掌纹样本C、以及掌纹样本D作为同一个ID对应的掌纹数据。
值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
综上所述,根据掌纹主线分布规律生成第一主线定位点以及第二主线定位点,根据掌纹主线弧度规律生成控制主线弧度的调节点数据,将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并生成包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练。通过上述方法,以掌纹中主线的分布情况,模拟得到多个掌纹样本,由于掌纹样本是通过生成数据(第一主线定位点、第二主线定位点以及调节点数据)的方式确定的,因而生成的掌纹样本是大批量的,其数量可以不设上限,使得生成的掌纹样本具有更强的多样性。在基于生成的掌纹样本对掌纹识别模型进行训练时,可以促使掌纹识别模型挖掘到更多掌纹数据集里不涉及的纹理内在规律与信息,突破掌纹数据集的局限性,提升掌纹识别模型的鲁棒性。
在一个可选的实施例中,如图7所示,根据掌纹主线分布规律以及掌纹主线弧度规律,生成第一主线定位点、第二主线定位点以及主线调节点的过程还可以实现为如下步骤710至步骤770。
步骤710,根据掌纹主线分布规律,确定与掌纹主线走向对应的第一区域和第二区域。
示意性的,以手掌掌纹为例进行说明,手掌掌纹中掌纹主线的分布具有一定规律。如 图3所示,为手掌掌纹的分布情况示意图,其中,掌纹主线320大体以左上角为第一主线定位点,右下角为第二主线定位点的呈现形式进行呈现;或者,将右下角视为掌纹主线320的第一主线定位点,左上角视为掌纹主线320的第二主线定位点。可选地,以左上角为第一主线定位点,右下角为第二主线定位点的形式,对掌纹主线进行分析。
在一个可选的实施例中,根据掌纹主线分布规律,确定掌纹生成区域。
其中,掌纹生成区域用于框定掌纹主线的分布范围。
示意性的,掌纹生成区域以随机生成的方式进行确定,例如:生成单位长度(1厘米)为边长的矩形区域;或者,生成预设长度为最大对角线的不规则形状区域等。
可选地,掌纹生成区域还可以以手掌掌纹的掌纹分布情况进行确定。示意性的,如图8所示,为手掌掌纹示意图。以图8所示的手掌掌纹的掌纹分布情况为例进行说明,根据手掌的掌纹主线分布规律,确定掌纹生成区域的过程包括如下过程。
(1)指缝关键点定位
可选地,采用目标检测器对手指指缝进行检测,并确定食指810与中指820之间的关键点A,中指820与无名指830之间的关键点B,以及无名指830与小拇指之间的关键点C,将关键点A、关键点B以及关键点C确定为三个指缝关键点,作为指缝关键点定位的定位结果。示意性的,采用目标检测器对手指指缝进行检测时,将两根拇指之间的中点位置作为指缝关键点位置。
(2)局部坐标系确定
在一个可选的实施例中,在确定根据指缝确定指缝关键点位置后,根据关键点建立局部坐标系。
示意性的,连接食指810与中指820之间的关键点A,以及无名指830与小拇指之间的关键点C,将连接得到的直线确定为局部坐标系的横轴(x轴);以中指820与无名指830之间的关键点B作为局部坐标系的原点,并确定与横轴垂直的竖轴(y轴),从而得到由关键点A、关键点B以及关键点C构建的局部坐标系。
可选地,沿局部坐标系中竖轴的负方向,确定掌纹生成区域的中心点D。其中,确定掌纹生成区域的中心点D的位置的方式包括:根据手掌掌心的宽度和长度进行确定;或者,根据关键点之间的距离进行确定等。
示意性的,当根据手掌掌心的宽度和长度对掌纹生成区域的中心点D的位置进行确定时,以手掌掌心的宽度和手掌掌心的长度为标准进行确定。例如:以手掌掌心的宽度和手掌掌心的长度为边长,构建矩形。基于矩形中对角线的交点,确定掌纹生成区域的中心点D的位置。
示意性的,当根据关键点之间的距离对掌纹生成区域的中心点D的位置进行确定时,首先确定关键点B与掌纹生成区域的中心点D之间的BD距离,以及关键点A与关键点C之间的AC距离;之后根据BD距离与AC距离之间的长度关系,确定掌纹生成区域的中心点D的位置。例如:设定BD距离为1.5倍的AC距离,由此根据AC距离以及构建得到的局部坐标系,确定掌纹生成区域的中心点D。
(3)掌纹生成区域提取
可选地,在确定掌纹生成区域的中心点D后,根据掌纹生成区域的中心点,确定掌纹生成区域。例如:以掌纹生成区域的中心点D为中心,构建一定边长的矩形区域,将该矩形区域作为掌纹生成区域;或者,以掌纹生成区域的中心点D为重心,构建不规则的手掌形状区域,将该不规则的手掌形状作为掌纹生成区域等。
以掌纹生成区域的中心点D为中心,将构建得到的矩形区域作为掌纹生成区域为例进行说明。根据关键点之间的长度关系,确定矩形区域的边长。
示意性的,在确定关键点A与关键点C之间的AC距离后,将AC距离作为掌纹生成区域的边长;或者,将AC距离的7/6倍作为掌纹生成区域的边长等。
或者,在确定关键点A与关键点B之间的AB距离后,将AB距离的2倍作为掌纹生成区域的边长等。
可选地,上述掌纹生成区域亦可称为感兴趣区域(ROI,Region Of Interest),即:掌纹生成区域为生成掌纹过程中所重点关注的区域,在该区域内进行掌纹生成过程。
示意性的,掌纹主线走向具有一定的规律。例如:手掌掌纹中的掌纹主线走向为左上角至右下角。在得到掌纹生成区域后,基于掌纹主线走向,在掌纹生成区域中确定对应的第一区域和第二区域,进而生成起始掌纹定位点以及终止掌纹定位点。
在一个可选的实施例中,在掌纹生成区域内确定呈对角关系的第一顶点和第二顶点。
示意性的,如图9所示,掌纹生成区域为一个矩形区域,将该矩形区域中确定呈现对角关系的顶点分别确定为第一顶点和第二顶点,其中,呈对角关系的顶点包括顶点910和顶点940;顶点920和顶点930。示意性的,以顶点910为第一顶点,则顶点940为第二顶点;以顶点920为第一顶点,则顶点930为第二顶点等。示意性的,以左手手掌的掌纹分布进行分析,左手手掌的掌纹一般呈现为从左上角至右下角的掌纹走向,即:若掌纹生成区域为如图9所示的矩形区域,则掌纹主线的走向为从顶点910(第一顶点)指向顶点940(第二顶点)。
在一个可选的实施例中,以第一顶点为中心,以第一预设长度为半径,在掌纹生成区域内确定第一区域。
示意性的,在确定第一顶点后,基于第一顶点确定的第一区域为扇形区域,其中,扇形区域的圆点为第一顶点,扇形区域的半径为第一预设长度。或者,将该扇形区域视为1/4的圆形区域,其中,圆形区域的中点为第一顶点,圆形区域的半径为第一预设长度。
可选地,第一预设长度既可以是预先设定的固定数值,也可以是基于掌纹生成区域确定的数值。
例如:第一预设长度为预先设定的固定数值,在基于第一顶点确定第一区域时,以第一顶点为中心,以预先设定的固定数值为半径,在掌纹生成区域内确定第一区域;或者,第一预设长度是基于掌纹生成区域确定的数值(如:以掌纹生成区域中的边长作为直径;或者,以掌纹生成区域中边长的一半作为直径等),在基于第一顶点确定第一区域时,以第一顶点为中心,以基于掌纹生成区域确定的数值为半径,在掌纹生成区域内确定第一区域等。
示意性的,当掌纹生成区域为单位长度的正方形区域时,如图9所示,圆点为第三顶点,对于第一主线定位点而言,第一主线定位点的坐标定义如下所示:
Figure PCTCN2022133470-appb-000001
其中,x用于指示横轴坐标;y用于指示纵轴坐标。
在一个可选的实施例中,以第二顶点为中心,以第二预设长度为半径,在掌纹生成区域内确定第二区域。
可选地,根据第二顶点确定第二区域的过程与根据第一顶点确定第一区域的过程相似。示意性的,其中,第二预设长度与第一预设长度的长度数值既可以相同,也可以不同。
例如:如图9所示,掌纹生成区域为正方形区域,当第二预设长度与第一预设长度的长度数值相同时,以第二顶点为中心、第二预设长度为半径所形成的第二区域,与以第一顶点为中心、第一预设长度为半径所形成的第一区域均为扇形区域,且第一区域与第二区域为相同形状的区域。
示意性的,当掌纹生成区域为单位长度的正方形区域时,如图9所示,圆点为第三顶点,对于第二主线定位点而言,第二主线定位点的坐标定义如下所示:
Figure PCTCN2022133470-appb-000002
其中,x用于指示横轴坐标;y用于指示纵轴坐标。
或者,当第二预设长度与第一预设长度的长度数值不同时,以第二顶点为中心、第二预设长度为半径所形成的第二区域,与以第一顶点为中心、第一预设长度为半径所形成的第一区域的区域形状不同,如:当掌纹生成区域为正方形区域时,若第二预设长度的长度数值较大、第一预设长度的长度数值较小时,第二预设长度对应的第二区域比第一预设长度对应的第一区域更大。
值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
步骤720,在第一区域内确定第一主线定位点对应的第一数据。
可选地,在确定第一区域后,在第一区域内,以随机选取的方式确定第一主线定位点对应的第一数据。
其中,随机选取用于指示等概率的选取方式。示意性的,在第一区域内,以等概率的方式,随机将某个坐标点对应的坐标作为第一主线定位点的坐标,实现生成第一数据的过程。
可选地,根据掌纹主线的生成规律,以非等概率的选取方式,在第一区域内,确定第一主线定位点对应的第一数据。例如:经过对掌纹分布情况进行分析后发现,掌纹的掌纹主线多数以M点为起点,则在第一区域内确定第一数据时,设置将M点作为第一主线定位点的概率较大,进而实现以非等概率选取的方式选取第一数据的过程。
步骤730,在第二区域内确定第二主线定位点对应的第二数据。
可选地,在确定第二区域后,在第二区域内,以随机选取的方式确定第一主线定位点对应的第二数据。
其中,随机选取用于指示等概率的选取方式。示意性的,在第二区域内,以等概率的方式,随机将某个坐标点对应的坐标作为第二主线定位点的坐标,实现生成第二数据的过程。
可选地,根据掌纹主线的生成规律,以非等概率的选取方式,在第二区域内,确定第二主线定位点对应的第二数据。例如:经过对掌纹的掌纹分布情况进行分析后发现,掌纹的掌纹主线多数以N点、L点为终点,则在第二区域内确定第二数据时,设置将N点、L点作为第二主线定位点的概率较大,进而实现以非等概率选取的方式选取第二数据的过程。
值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
步骤740,根据掌纹主线弧度规律,基于第一主线定位点和第二主线定位点的位置关系,确定第三区域。
示意性的,掌纹主线弧度规律用于指示掌纹主线的弯曲情况。例如:掌纹中掌纹主线的弧度较小;掌纹中掌纹主线的弯曲程度较为平滑等。
可选地,基于第一主线定位点和第二主线定位点的位置关系,确定用于生成主线调节点的第三区域。
在一个可选的实施例中,连接第一主线定位点和第二主线定位点,得到目标线段。
示意性的,如图10所示,在掌纹生成区域1010中,确定第一主线定位点1020(以“倒三角”符号表示)以及第二主线定位点1030(以“圆形”符号表示),将第一主线定位点1020和第二主线定位点1030连接后,得到目标线段1040。
可选地,以目标线段的线段中点为中心,将预设边长的矩形区域作为第三区域。
示意性的,预设边长既包括预先设定的固定数值,也包括基于掌纹生成区域确定的数值。
例如:预设边长为预先设定的固定数值,在基于线段中点确定第三区域时,以线段中点为中心,以预先设定的固定数值为边长,将在掌纹生成区域内确定的矩形区域作为第三区域。例如:预先设定的固定数值包括:矩形的长a以及矩形的宽b,以线段中点为中心,以矩形的长a为第三区域的长,以矩形的宽b为第三区域的宽,从而得到第三区域。
或者,预设边长是基于掌纹生成区域确定的数值(如:以掌纹生成区域中边长的一半为边长;或者,以掌纹生成区域中目标线段的一半为边长等),在基于线段中点确定第一区域时,以线段中点为中心,以基于掌纹生成区域确定的数值为边长,在掌纹生成区域内确定第三区域等。
例如:如图10所示,在得到目标线段1040后,以目标线段1040的线段中点为中心,以预先设定的固定数值为边长,得到第三区域1050。
在一个可选的实施例中,假设第一主线定位点和第二主线定位点连线的目标线段的中点坐标为(x c,y c),以中点坐标(x c,y c)为中心,以目标线段为判断基准,确定第三区域的过程如下所示。
示意性的,掌纹生成区域的长度为单位长度1,欲得到的第三区域为一个正方形区域,该正方形区域的边长预先设置为2/3,则第三区域为以中点坐标(x c,y c)为中心、平行于目标线段且边长为2/3的正方形区域。
可选地,通过确定直线方程的方法圈定第三区域,直线方程由主线定位点与第二主线定位点唯一确定。示意性的,将第一主线定位点与第二主线定位点连线的目标线段所处直线定义为直线A,直线A为x=k 1x+b 1。同理,将经过中点坐标(x c,y c)且垂直于直线A的直线B定义为y=k 2x+b 2
其中,k 1用于指示直线A对应的斜率;b 1用于指示直线A对应的截距;k 2用于指示直线B对应的斜率;b 2用于指示直线B对应的截距,其中,k 1、b 1、k 2以及b 2的关系如下所示:
Figure PCTCN2022133470-appb-000003
即:根据直线A和中点坐标(x c,y c),可以唯一地确定直线B。
可选地,如图11所示,基于中点坐标1110(x c,y c),以及第三区域的预设边长为2/3,分别确定两条平行于直线A且距离直线A的垂直距离为1/3的直线A 11120以及直线A 21130;两条平行于直线B且距离直线B垂直距离为1/3的直线B 11140以及直线B 21150。
直线A 11120的方程为:y=k 1x+b 3;直线A 21130的方程为:y=k 1x+b 4;直线B11140的方程为:y=k 2x+b 5;直线B 21150的方程为:y=k 2x+b 6
以上仅为示意性的举例,本申请实施例对此不加以限定。
示意性的,如图11所示,根据上述四条直线:直线A 11120、直线A 21130、直线B 11140以及直线B 21150,可唯一地确定四条直线的取值,并确定四条直线所围成的正方形区域,将该正方形区域作为第三区域。
步骤750,在第三区域内生成调节点数据。
可选地,在确定第三区域后,从第三区域内生成用于调节主线弧度的调节点数据。示意性的,调节点数据的坐标取值范围可定义如下形式:
Figure PCTCN2022133470-appb-000004
其中,k 1用于指示直线A 11120以及直线A 21130对应的斜率;b 3用于指示直线A 11120对应的截距;b 4用于指示直线A 21130对应的截距;k 2用于指示直线B 11140以及直线B 21150对应的斜率;b 5用于指示直线B 11140对应的截距;b 6用于指示直线B 21150对应的截距。
步骤760,基于第一数据、第二数据和调节点数据生成掌纹主线。
其中,掌纹主线为依次连接第一主线定位点、主线调节点和第二主线定位点的曲线。
示意性的,掌纹主线是将第一主线定位点、主线调节点以及第二主线定位点按照次序依次连接后得到的曲线。其中,第一主线定位点和第二主线定位点的坐标位置确定,主线 调节点可以对第一主线定位点和第二主线定位点之间围成的线段的弧度进行调节,从而得到不同的掌纹主线,即:主线调节点的位置与掌纹主线形成也具有密切关系。
步骤770,生成包含掌纹主线和掌纹细纹的至少一个掌纹样本。
掌纹样本用于对掌纹识别模型进行训练,掌纹识别模型用于进行掌纹识别。
示意性的,掌纹样本中包括掌纹主线、掌纹细纹。在得到包含掌纹主线的至少一个掌纹样本后,基于至少一个掌纹样本对掌纹识别模型进行训练,使得掌纹模型学习到不同掌纹样本之间的关系和差异,进而使得掌纹识别模型进行掌纹识别的过程中的识别效率更高。
可选地,在得到生成的掌纹样本后,在预先确定的扰动区间内,对掌纹样本添加轻微扰动,将增加轻微扰动后的掌纹样本视为同一ID对应的掌纹数据。示意性的,在预先确定的扰动区间内,针对一个掌纹样本,对其进行多种不同的扰动操作,得到与该掌纹样本对应的多个掌纹数据。例如:在预先确定的扰动区间内,针对一个掌纹样本,对该掌纹样本中的掌纹主线进行扰动,得到一个掌纹数据;对该掌纹样本中的掌纹细纹进行扰动,得到另一个掌纹数据等。将该掌纹样本以及基于该掌纹样本得到的掌纹数据作为同一ID对应的掌纹数据。通过在一定扰动区间内,对掌纹样本施加轻微扰动的过程,可以形成更多性的掌纹样本。可选地,在扰动区间内对掌纹样本进行扰动的过程中,既可以对掌纹样本进行一次扰动后,得到与掌纹样本属于同一ID的掌纹数据;也可以对掌纹样本进行多次扰动后,得到与掌纹样本属于同一ID的掌纹数据。其中,当对掌纹样本进行多次扰动时,多次扰动的扰动总值位于扰动区间内。以上仅为示意性的举例,本申请实施例对此不加以限定。
综上所述,将生成的第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并得到包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练。通过上述方法,以掌纹中主线的分布情况,模拟得到大批量的掌纹样本,使得生成的掌纹样本之间具有更强的多样性。基于掌纹样本对掌纹识别模型训练,可以突破掌纹数据集的局限性,提升掌纹识别模型的鲁棒性。
在本申请实施例提供的方法中,对根据区域划分得到掌纹样本的过程进行说明。根据掌纹主线分布规律,确定与掌纹主线走向对应的第一区域和第二区域,在第一区域内确定第一数据并在第二区域内确定第二数据,还根据掌纹主线弧度规律确定第三区域,并在第三区域内生成调节点数据,依次连接第一数据对应的第一主线定位点、主线调节点和第二数据对应的第二主线定位点,生成包含掌纹主线的至少一个掌纹样本。通过上述方法,将掌纹主线分布规律和掌纹主线弧度规律以区域划分的方式进行表示,进而能够更形象地确定掌纹主线中第一主线定位点以及第二主线定位点的位置信息,从而确定主线调节点,将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,进而得到包括掌纹主线的掌纹样本,并在预先确定的扰动区间内,对生成的掌纹样本进行轻微扰动(如:对第一主线定位点、主线调节点以及第二主线定位点中的任意一点或者任意几点进行扰动),得到属于同一身份标识且多样性更强的多个掌纹数据,进一步提高掌纹样本的多样性。
在一个可选的实施例中,在得到至少一个掌纹样本后,以至少一个掌纹样本对掌纹识别模型进行训练。示意性的,如图12所示,上述图2所示出的步骤240之后还包括实现如下步骤1210至步骤1230。
步骤1210,获取样本图像集。
其中,样本图像集中存储有至少一个样本图像。
示意性的,样本图像集中的样本图像包括多种类别,例如:风景类图像、建筑类图像、动物类图像、植物类图像等。可选地,样本图像集为一款大型分类图像数据集,如:图像网络(ImageNet)数据集。
步骤1220,以样本图像为背景,将掌纹样本嵌套在样本图像之上,得到目标图像。
示意性的,从样本图像集中选取多个样本图像,以被选择的样本图像为背景,将生成得到的掌纹样本嵌套在被选择的样本图像之上,得到包括掌纹样本和样本图像的目标样本。
可选地,以被选择的样本图像为背景,用于指示将被选择的样本图像置于下方;将生成得到的掌纹样本嵌套在样本图像之上,用于指示将掌纹样本置于上方。如:以图层形式对样本图像和掌纹样本之间的嵌套关系进行表示,图层1在图层2之下,即样本图像为图层1,目标样本为图层2。
在一个可选的实施例中,设定掌纹样本中掌纹主线、掌纹细纹等纹理的颜色为c、宽度为w,将掌纹样本置于上层,将在样本图像集中挑选的样本图像I置于下层,即:将掌纹样本嵌套至样本图像I之上,得到目标图像。示意性的,嵌套得到目标图像的过程如下所示:
S=synthesize(P,Q,c,w,I)
其中,S用于指示将掌纹样本(包括掌纹主线和掌纹细纹)嵌套至样本图像I上所得到的目标图像;synthesize用于指示将掌纹样本嵌套至样本图像I上生成目标图像的过程;P用于指示掌纹样本对应的掌纹主线;Q用于指示在掌纹样本对应的掌纹细纹。
示意性的,在掌纹样本生成后,该掌纹样本对应的掌纹主线和掌纹细纹的颜色、长度、宽度等纹理特征信息确定,此外,掌纹主线和掌纹细纹的纹理位置信息也相对确定,基于上述纹理信息,在将掌纹样本嵌套至样本图像得到的目标图像上,已嵌套的掌纹样本与未嵌套的掌纹样本是相同的,即:已嵌套的掌纹样本与未嵌套的掌纹样本所对应的纹理特征信息、纹理位置信息是相同的。
示意性的,在将掌纹样本嵌套至样本图像的过程中,当样本图像的尺寸与掌纹样本生成区域的尺寸不相同时,嵌套过程可以有所区别。例如:当样本图像的尺寸比掌纹样本生成区域的尺寸大时,将掌纹样本直接嵌套至样本图像之上,或者,将样本图像缩略至一定尺寸(如:掌纹样本生成区域的尺寸)后,将掌纹样本嵌套至样本图像之上;当样本图像的尺寸比掌纹样本生成区域的尺寸小时,将掌纹样本直接嵌套至样本图像之上,或者,将样本图像扩大至一定尺寸(如:掌纹样本生成区域的尺寸)后,将掌纹样本嵌套至样本图像之上等。
值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
在一个可选的实施例中,在目标扰动区间内,对至少一个掌纹样本进行扰动,得到目标样本。
示意性的,目标扰动区间包括掌纹主线扰动区间和掌纹细纹扰动区间。
其中,掌纹主线扰动区间用于指示对掌纹主线进行扰动的区间范围;掌纹细纹扰动区域用于指示对掌纹细纹进行扰动的区间范围。
可选地,在目标扰动区间内,对掌纹样本进行扰动后,得到多个目标样本。例如:在掌纹主线扰动区间内,对掌纹样本中的掌纹主线进行扰动,得到多个掌纹主线发生细微变化的目标样本;或者,在掌纹细纹扰动区间内,对掌纹样本中的掌纹细纹进行扰动,得到多个掌纹细纹发生细微变化的目标样本;或者,在目标扰动区间内,对掌纹样本中的掌纹主线以及掌纹细纹进行扰动,得到多个掌纹主线和掌纹细纹发生细微变化的目标样本等。
可选地,在掌纹的掌纹分布情况中,手掌姿态、拍摄角度、拍摄位置等因素均会使得最终成像的同一只手掌的不同照片上的掌纹产生轻微差异。示意性的,基于提升模型的鲁棒性的考虑下,向生成的掌纹样本上添加轻微的扰动,将增加轻微扰动后的掌纹样本视为同一身份标识对应的掌纹数据。
在一个可选的实施例中,对至少一个掌纹样本进行扰动可以实现为:对至少一个掌纹样本对应的掌纹主线增加噪声;或者,对至少一个掌纹样本对应的掌纹细纹增加噪声。
示意性的,向生成的掌纹样本增加扰动噪声的过程如下所示:
Figure PCTCN2022133470-appb-000005
其中,P i用于指示第i个掌纹样本中的掌纹主线;
Figure PCTCN2022133470-appb-000006
用于指示在掌纹主线的基础上添加了扰动噪声的第j个掌纹样本;N p用于指示在掌纹主线上添加的扰动噪声;Q i用于指示第i个掌纹样本中的掌纹细纹;
Figure PCTCN2022133470-appb-000007
用于指示在掌纹主线的基础上添加了扰动噪声的第j个掌纹样本;N q用于指示在掌纹细纹上添加的扰动噪声。可选地,扰动噪声
Figure PCTCN2022133470-appb-000008
扰动噪声
Figure PCTCN2022133470-appb-000009
均为非常细小的高斯噪声。
在一个可选的实施例中,在掌纹主线扰动区间内,对至少一个掌纹样本对应的掌纹主线进行扰动,得到扰动主线;在掌纹细纹扰动区间内,对至少一个掌纹样本对应的掌纹细纹进行扰动,得到扰动细纹;基于扰动主线和扰动细纹,得到目标样本。
示意性的,上述扰动噪声N p即为掌纹主线对应的掌纹主线扰动区间,上述扰动噪声N q即为掌纹细纹对应的掌纹细纹扰动区间,将扰动噪声N p和扰动噪声N q统称为目标扰动区间。
如图13所示,为对掌纹样本添加扰动噪声后,得到的多组掌纹样本的示意图。可选地,掌纹样本1310、掌纹样本1320、掌纹样本1330和掌纹样本1340为基于上述掌纹样本的生成方法生成得到的掌纹样本。
示意性的,以对掌纹样本1310进行扰动为例进行说明。在目标扰动区间内,对掌纹样本1310的掌纹主线、掌纹细纹上添加细微的高斯噪声,得到目标样本1311、目标样本1312以及目标样本1313,将目标样本1311、目标样本1312以及目标样本1313作为同一身份标识对应的掌纹数据。
或者,以对掌纹样本1320进行扰动为例进行说明。在目标扰动区间内,对掌纹样本1320的掌纹主线、掌纹细纹上添加细微的高斯噪声,得到目标样本1321、目标样本1322以及目标样本1323,将目标样本1321、目标样本1322以及目标样本1323作为同一身份标识对应的掌纹数据等。
基于上述同样的方法,得到与掌纹样本1330对应的目标样本1331、目标样本1332以及目标样本1333,将目标样本1331、目标样本1332以及目标样本1333作为同一身份标识对应的掌纹数据;还得到与掌纹样本1340对应的目标样本1341、目标样本1342以及目标样本1343,将目标样本1341、目标样本1342以及目标样本1343作为同一身份标识对应的掌纹数据等。
也即:在上述过程中,同一身份标识对应的目标样本中掌纹主线和掌纹细纹的数量是确定的,在目标扰动范围内施加扰动噪声所造成的轻微变化是被允许的,即:在目标扰动范围内施加扰动噪声后得到的掌纹数据,仍然视为同一身份标识的掌纹数据。
值得注意的是,以上仅为示意性的举例,本申请实施例对此不加以限定。
在一个可选的实施例中,以样本图像为背景,将目标样本嵌套在样本图像之上,得到目标图像。
可选地,以样本图像为背景,用于指示将样本图像置于下方;将目标样本嵌套在样本图像之上,用于指示将目标样本置于上方。如:以图层对图像之间的嵌套关系进行表示, 图层1在图层2之下,则样本图像为图层1;目标样本为图层2。
示意性的,如图14所示,是将目标样本嵌套在样本图像之上得到的目标图像示意图。例如:目标图像1410是将目标样本1400嵌套在风景图像1411上得到的图像,其中,风景图像1411即为样本图像;或者,目标图像1420是将目标样本1400嵌套在动物图像1421上得到的图像,其中,动物图像1421即为样本图像。
可选地,多种图像尺寸、图像质量等参数不同的图像,亦可以作为上述样本图像,例如:样本图像既可以为清晰度较高的图像,也可以为清晰度较低的图像等。
步骤1230,以目标图像对掌纹识别模型进行训练。
在一个可选的实施例中,以目标图像对掌纹识别模型进行第一训练,得到候选掌纹识别模型。
示意性的,在得到多个身份标识各自对应的至少一幅目标图像后,以目标图像为掌纹识别模型的输入,对掌纹识别模型进行第一训练。
例如:经过上述掌纹生成方法获取得到一个掌纹样本后,对掌纹样本中的掌纹主线以及掌纹细纹进行扰动,得到多个目标样本,多个目标样本对应身份标识A,将每一个目标样本置于不同类型的样本图像之上,得到多幅目标图像,多幅目标图像也对应身份标识A,将身份标识A对应的多幅目标图像输入掌纹识别模型后,由掌纹识别模型对多幅目标图像进行学习,从而防止掌纹识别模型对掌纹样本中掌纹主线、掌纹细纹等的纹理颜色、纹理宽度、背景内容过拟合的问题发生。
可选地,设定掌纹样本中掌纹主线、掌纹细纹等纹理的颜色为c、宽度为w,并在样本图像集中随机挑选样本图像I作为目标图像的背景。示意性的,生成的掌纹纹理总结如下:
Figure PCTCN2022133470-appb-000010
其中,synthesize用于指示生成目标图像的过程;
Figure PCTCN2022133470-appb-000011
用于指示将生成的掌纹样本(其中包括掌纹主线以及掌纹细纹)嵌套至样本图像I上所得到的目标图像;
Figure PCTCN2022133470-appb-000012
用于指示在掌纹主线的基础上添加了扰动噪声的第j个掌纹样本;
Figure PCTCN2022133470-appb-000013
用于指示在掌纹主线的基础上添加了扰动噪声的第j个掌纹样本。
在一个可选的实施例中,获取掌纹数据集。
其中,掌纹数据集中存储有至少一个掌纹数据,至少一个掌纹数据对应标注有数据标签。
示意性的,掌纹数据集中存储的掌纹数据为经过合法授权得到的掌纹数据。可选地,掌纹数据对应标注的数据标签,用于区别不同的掌纹数据。例如:掌纹数据1为用户1对应的掌纹,将用户1作为掌纹数据1的数据标签;或者,掌纹数据2为从家庭掌纹数据库2中获取得到的掌纹,将家庭掌纹数据库2作为掌纹数据1的数据标签等。
以上仅为示意性的举例,本申请实施例对此不加以限定。
在一个可选的实施例中,以掌纹数据和掌纹数据对应的数据标签,对候选掌纹识别模型进行第二训练,得到目标掌纹识别模型。
其中,目标掌纹识别模型为对掌纹识别模型训练得到的模型。
示意性的,将生成的掌纹样本用于在掌纹识别模型的训练阶段提升模型性能,即:将掌纹样本或者掌纹样本对应的目标图像对掌纹识别模型进行第一训练,得到候选掌纹识别模型,此时的候选掌纹模型能够较好地学习生成的掌纹样本的纹理信息。
在一个可选的实施例中,基于将候选掌纹模型应用于现实场景下的考虑,采用掌纹数 据以及掌纹数据对应的数据标签,对候选掌纹模型进行第二训练,其中,第二训练用于以生物所具有的掌纹数据提升候选掌纹模型对真实掌纹的识别模型。
示意性的,如图15所示,对掌纹模型进行第一训练以及第二训练的训练过程如下所示。
步骤1510,生成掌纹样本。
可选地,采用上述掌纹样本生成方法,得到包含掌纹主线和掌纹细纹的掌纹样本。生成的掌纹样本可以辅助掌纹识别模型关注到掌纹主线、掌纹细纹等纹理之间细微的变化,促使掌纹识别模型学习到更具有区分力的特征。
步骤1520,大批量合成目标图像。
示意性的,在得到掌纹样本后,对掌纹样本进行扰动得到目标样本,以从样本图像集中任意获取得到的样本图像为背景,将目标样本嵌套在样本图像之上,得到目标图像。
步骤1530,第一训练。
可选地,将大批量合成目标图像输入掌纹识别模型后,基于目标图像对掌纹识别模型进行第一训练。
示意性的,在大批量合成的目标图像中,包括身份标识A的a个目标图像以及身份标识B的b个目标图像,将a个目标图像以及b个目标图像输入掌纹识别模型,使得掌纹识别模型学习不同目标图像中不同身份标识对应掌纹样本的掌纹纹理信息(掌纹主线信息、掌纹细纹信息)等。例如:掌纹识别模型学习身份标识A的a个目标图像之间的相似性,以及身份标识B的b个目标图像之间的相似性;此外,掌纹识别模型还对身份标识A的a个目标图像与身份标识B的b个目标图像之间的差异性进行学习,进而确定不同目标图像中相同身份标识对应掌纹样本的掌纹纹理信息的相似性,以及不同目标图像中不同身份标识对应掌纹样本的掌纹纹理信息的差异性等。可选地,基于上述第一训练,得到候选掌纹识别模型。
步骤1540,获取公开的掌纹数据集。
示意性的,基于合法途径,获取已公开的、存储有多个掌纹数据的掌纹数据集,掌纹数据集中存储有标注有数据标签的多个掌纹数据。
步骤1550,第二训练。
可选地,考虑到掌纹样本与生物所对应的掌纹数据之间可能存在一定差异,在对掌纹识别模型进行第一训练后,用生物所对应的掌纹数据对候选掌纹识别模型进行第二训练。
在一个可选的实施例中,将掌纹数据输入候选掌纹识别模型,基于候选掌纹识别模型的输出数据和掌纹数据对应的数据标签,确定掌纹数据对应的损失值;以损失值对候选掌纹识别模型进行训练;响应于对候选掌纹识别模型的训练达到训练目标,得到目标掌纹识别模型。
示意性的,基于掌纹数据集中的多个掌纹数据,以及多个掌纹数据对应的数据标签,对候选掌纹识别模型进行第二训练。例如:将候选掌纹识别模型对掌纹数据的输出与掌纹数据对应的数据标签进行损失值计算,基于损失值计算结果,以减小损失值为训练目标,对候选掌纹识别模型进行第二训练,实现对候选掌纹识别模型进行微调的过程。
例如,将掌纹数据输入候选掌纹识别模型,候选掌纹识别模型输出掌纹数据对应的预测标签,基于掌纹数据对应的预测标签和数据标签之间的差异,确定掌纹数据对应的损失值。可以理解,数据标签为训练标签,是掌纹数据对应的正确标签,而预测标签是模型对输入数据进行数据处理后预测得到的标签。对模型进行训练是为了让模型学习不同掌纹数据中相同数据标签对应的掌纹数据之间的相似性,以及不同掌纹数据中不同数据标签对应的掌纹数据之间的差异性,使得模型最终能够输出正确标签或与正确标签非常接近的标签,具备掌纹识别能力。
可选地,在以损失值对候选掌纹识别模型进行训练的过程中,会因为对候选掌纹识别 模型的训练达到训练目标而得到目标掌纹识别模型,示意性的,训练目标至少包括如下一种情况。
1、响应于损失值达到收敛状态,将最近一次迭代训练得到的候选掌纹识别模型作为目标掌纹识别模型。
示意性的,损失值达到收敛状态用于指示通过损失函数得到的损失值的数值不再变化或者变化幅度小于预设阈值。例如:第n个掌纹数据对应的损失值为0.1,第n+1个掌纹数据对应的损失值也为0.1,可以视为该损失值达到收敛状态,将第n个掌纹数据或者第n+1个掌纹数据对应的损失值调整的候选掌纹识别模型作为目标掌纹识别模型,实现对候选掌纹识别模型的训练过程。
2、响应于损失值的获取次数达到次数阈值,将最近一次迭代训练得到的候选掌纹识别模型作为目标掌纹识别模型。
示意性的,一次获取可以得到一个损失值,预先设定用于训练候选掌纹识别模型的损失值的获取次数,当一个掌纹数据对应一个损失值时,损失值的获取次数即为掌纹数据的个数;或者,当一个掌纹数据对应多个损失值时,损失的获取次数即为损失值的个数。例如:预先设定一次获取可以得到一个损失值,损失值获取的次数阈值为10次,即当达到获取次数阈值时,将最近一次损失值调整的候选掌纹识别模型作为目标掌纹识别模型,或者将损失值10次调整过程中最小损失值调整的候选掌纹识别模型作为目标掌纹识别模型,实现对候选掌纹识别模型的训练过程。
在一个可选的实施例中,在得到目标掌纹识别模型后,对掌纹进行识别。示意性的,如图16所示,为对掌纹进行识别的流程图。
首先,拍摄掌纹识别照1610以及掌纹注册照1620,基于掌纹识别照1610以及掌纹注册照1620,对掌纹对应的手掌进行检测,并提取得到掌纹兴趣区域1630;之后,将掌纹兴趣区域1630传送至后台1640(如:服务器),由后台1640将掌纹识别照1610、掌纹注册照1620以及掌纹兴趣区域1630添加至掌纹注册库中;最后,由后台1640基于本端的目标掌纹识别模型,对掌纹进行识别。可选地,在对掌纹进行识别后,将掌纹识别的结果显示在前端(如:终端)。
示意性的,掌纹识别结果既包括以“是”或“否”的形式进行呈现,也包括以概率等数值表示方式进行呈现。以上仅为示意性的举例,本申请实施例对比不加以限定。
如下表所示,其中包括目标掌纹识别模型的识别数据,以及通过其他掌纹识别技术得到的识别数据。
表1
方法 CASIA IITD PolyU TCD MPD
PalmNet 97.17/3.21 97.31/3.83 99.95/0.39 99.89/0.40 91.88/6.22
ArcFace 97.92/0.009 98.73/0.012 98.58/0.014 98.83/0.008 96.12/0.022
ArcFace+ours 99.75/0.004 100.0/0.000 100.0/0.000 100.0/0.000 99.96/0.001
表1示出了目标掌纹识别模型和掌纹识别领域内其他方法在5个公开数据集上的识别效果。五个公开数据集分别为:中国科学院自动化研究所汉语情感词料库(CASIA,Institute of Automation,Chinese Academy of Sciences)、理工学院德里分校数据集(IITD,Indian Institute of Technology Delhi)、理工大学数据集(PolyU,Polytechnic University)、都柏林圣三一学院(TCD,Trinity College Dublin)和维修技术数据(MPD,Maintenance Planning Document)。评价指标分别为:第一准确率(Top-1)和平均错误概率(EER,Equal Error Rate)。通信协议(PalmNet)为掌纹领域目前最先进的方法,在此处作为对照。
其中,Top-1指标越高,代表识别效果越好,EER指标越小,代表识别效果越好。示意性的,采用基线方法虹软识别技术(ArcFace),其骨干网络为移动电话网络(MobileFaceNet)。由上表可知,目标掌纹识别模型对掌纹识别的效果较其他方法更为优 异。
综上所述,将生成的第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并得到包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练。通过上述方法,以掌纹中主线的分布情况,模拟得到大批量的掌纹样本,使得生成的掌纹样本之间具有更强的多样性。基于掌纹样本对掌纹识别模型训练,可以突破掌纹数据集的局限性,提升掌纹识别模型的鲁棒性。
在本申请实施例提供的方法中,对以至少一个掌纹样本对掌纹识别模型进行训练的过程进行说明。首先获取样本图像集,之后以样本图像集中的样本图像为背景,将掌纹样本嵌套在样本图像之上,得到目标图像,进而以目标图像对掌纹识别模型进行训练,得到目标掌纹识别模型。通过上述方法,可以提升目标掌纹识别模型在现实场景中的掌纹识别性能,而且,使用目标掌纹识别模型不会增加额外的计算量和训练负担,是一种简便且行之有效的训练优化方案。
图17是本申请一个示例性实施例提供的掌纹样本的生成装置的结构框图,如图17所示,该装置包括如下部分:
定位点生成模块1710,用于根据掌纹主线分布规律生成定位点数据,定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据。
调节点生成模块1720,用于根据掌纹主线弧度规律生成调节点数据,调节点数据对应的主线调节点用于控制第一主线定位点和第二主线定位点所构成的主线的弧度。
主线生成模块1730,用于基于第一数据、第二数据和调节点数据生成掌纹主线,掌纹主线为依次连接第一主线定位点、主线调节点和第二主线定位点的曲线。
样本生成模块1740,用于生成包含掌纹主线的至少一个掌纹样本,掌纹样本用于对掌纹识别模型进行训练,掌纹识别模型用于进行掌纹识别。
在一个可选的实施例中,定位点生成模块1710还用于根据掌纹主线分布规律,确定与掌纹主线走向对应的第一区域和第二区域;在第一区域内确定第一主线定位点对应的第一数据;在第二区域内确定第二主线定位点对应的第二数据。
在一个可选的实施例中,定位点生成模块1710还用于根据掌纹主线分布规律,确定掌纹生成区域,掌纹生成区域用于框定掌纹主线的分布范围;在掌纹生成区域内确定呈对角关系的第一顶点和第二顶点;以第一顶点为中心,以第一预设长度为半径,在掌纹生成区域内确定第一区域;以第二顶点为中心,以第二预设长度为半径,在掌纹生成区域内确定第二区域。
在一个可选的实施例中,定位点生成模块1710还用于在第一区域内,以随机选取的方式确定第一主线定位点对应的第一数据;在第二区域中,以随机选取的方式确定第二主线定位点对应的第二数据。
在一个可选的实施例中,调节点生成模块1720还用于根据掌纹主线弧度规律,基于第一主线定位点和第二主线定位点的位置关系,确定第三区域;在第三区域内生成调节点数据。
在一个可选的实施例中,调节点生成模块1720还用于连接第一主线定位点和第二主线定位点,得到目标线段;以目标线段的线段中点为中心,将预设边长的矩形区域作为第三区域。
在一个可选的实施例中,掌纹样本中还包括掌纹细纹。
样本生成模块1740还用于确定至少两个掌纹细纹定位点;基于至少两个掌纹细纹定位点,生成掌纹细纹;生成包含掌纹主线和掌纹细纹的至少一个掌纹样本。
在一个可选的实施例中,样本生成模块1740还用于连接至少两个掌纹细纹定位点,得到掌纹细纹。
在一个可选的实施例中,样本生成模块1740还用于基于至少两个掌纹细纹定位点,确定掌纹细纹调节点,掌纹细纹调节点用于控制至少两个掌纹细纹定位点之间的弧度;在预设的掌纹细纹数量范围内,基于至少两个掌纹细纹定位点和掌纹细纹调节点,确定掌纹细纹。
在一个可选的实施例中,如图18所示,该装置还包括:
获取模块1750,用于获取样本图像集,样本图像集中存储有至少一个样本图像;
嵌套模块1760,用于以样本图像为背景,将掌纹样本嵌套在样本图像之上,得到目标图像;
训练模块1770,用于以目标图像对掌纹识别模型进行训练。
在一个可选的实施例中,嵌套模块1760还用于在目标扰动区间内,对至少一个掌纹样本进行扰动,得到目标样本;以样本图像为背景,将目标样本嵌套在样本图像之上,得到目标图像。
在一个可选的实施例中,目标扰动区间包括掌纹主线扰动区间和掌纹细纹扰动区间。
嵌套模块1760还用于在掌纹主线扰动区间内,对至少一个掌纹样本对应的掌纹主线进行扰动,得到扰动主线;在掌纹细纹扰动区间内,对至少一个掌纹样本对应的掌纹细纹进行扰动,得到扰动细纹;基于扰动主线和扰动细纹,得到目标样本。
在一个可选的实施例中,嵌套模块1760还用于对至少一个掌纹样本对应的掌纹主线增加噪声。
在一个可选的实施例中,嵌套模块1760还用于对至少一个掌纹样本对应的掌纹细纹增加噪声。
在一个可选的实施例中,训练模块1770还用于以目标图像对掌纹识别模型进行第一训练,得到候选掌纹识别模型;获取掌纹数据集,掌纹数据集中存储有至少一个掌纹数据,至少一个掌纹数据对应标注有数据标签;以掌纹数据和掌纹数据对应的数据标签,对候选掌纹识别模型进行第二训练,得到目标掌纹识别模型,目标掌纹识别模型为对掌纹识别模型训练得到的模型。
在一个可选的实施例中,训练模块1770还用于将掌纹数据输入候选掌纹识别模型,基于候选掌纹识别模型的输出数据和掌纹数据对应的数据标签,确定掌纹数据对应的损失值;以损失值对候选掌纹识别模型进行训练;响应于对候选掌纹识别模型的训练达到训练目标,得到目标掌纹识别模型。
综上所述,根据掌纹主线分布规律生成第一主线定位点以及第二主线定位点,根据掌纹主线弧度规律生成控制主线弧度的调节点数据,将第一主线定位点、主线调节点以及第二主线定位点依次连接后得到的曲线作为掌纹主线,并生成包含掌纹主线的至少一个掌纹样本,以掌纹样本对掌纹识别模型进行训练。通过上述装置,以掌纹中主线的分布情况,模拟得到多个掌纹样本,由于掌纹样本是通过生成数据(第一主线定位点、第二主线定位点以及调节点数据)的方式确定的,因而生成的掌纹样本是大批量的,其数量可以不设上限,使得生成的掌纹样本具有更强的多样性。在基于生成的掌纹样本对掌纹识别模型进行训练时,可以促使掌纹识别模型挖掘到更多掌纹数据集里不涉及的纹理内在规律与信息,突破掌纹数据集的局限性,提升掌纹识别模型的鲁棒性。
需要说明的是:上述实施例提供的掌纹样本的生成装置,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的掌纹样本的生成装置与掌纹样本的生成方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图19示出了本申请一个示例性实施例提供的服务器的结构示意图。该服务器1900包括中央处理单元(Central Processing Unit,CPU)1901、包括随机存取存储器(Random Access Memory,RAM)1902和只读存储器(Read Only Memory,ROM)1903的系统存储器1904,以及连接系统存储器1904和中央处理单元1901的系统总线1905。服务器1900还包括用于存储操作系统1913、应用程序1914和其他程序模块1915的大容量存储设备1906。
大容量存储设备1906通过连接到系统总线1905的大容量存储控制器(未示出)连接到中央处理单元1901。大容量存储设备1906及其相关联的计算机可读介质为服务器1900提供非易失性存储。也就是说,大容量存储设备1906可以包括诸如硬盘或者紧凑型光盘只读存储器(Compact Disc Read Only Memory,CD-ROM)驱动器之类的计算机可读介质(未示出)。
不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、带电可擦可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM)、闪存或其他固态存储技术,CD-ROM、数字通用光盘(Digital Versatile Disc,DVD)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器1904和大容量存储设备1906可以统称为存储器。
根据本申请的各种实施例,服务器1900还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器1900可以通过连接在系统总线1905上的网络接口单元1911连接到网络1912,或者说,也可以使用网络接口单元1911来连接到其他类型的网络或远程计算机系统(未示出)。
上述存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,被配置由CPU执行。
本申请的实施例还提供了一种计算机设备,该计算机设备包括处理器和存储器,该存储器中存储有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现上述各方法实施例提供的掌纹样本的生成方法。
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行,以实现上述各方法实施例提供的掌纹样本的生成方法。
本申请的实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述实施例中任一所述的掌纹样本的生成方法。
可选地,该计算机可读存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、固态硬盘(SSD,Solid State Drives)或光盘等。其中,随机存取记忆体可以包括电阻式随机存取记忆体(ReRAM,Resistance Random Access Memory)和动态随机存取存储器(DRAM,Dynamic Random Access Memory)。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储 介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种掌纹样本的生成方法,其特征在于,由计算机设备执行,所述方法包括:
    根据掌纹主线分布规律生成定位点数据,所述定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据;
    根据掌纹主线弧度规律生成调节点数据,所述调节点数据对应的主线调节点用于控制所述第一主线定位点和所述第二主线定位点所构成的主线的弧度;
    基于所述第一数据、所述第二数据和所述调节点数据生成掌纹主线,所述掌纹主线为依次连接所述第一主线定位点、所述主线调节点和所述第二主线定位点的曲线;及
    生成包含所述掌纹主线的至少一个掌纹样本,所述掌纹样本用于对掌纹识别模型进行训练,所述掌纹识别模型用于进行掌纹识别。
  2. 根据权利要求1所述的方法,其特征在于,所述根据掌纹主线分布规律生成定位点数据,包括:
    根据所述掌纹主线分布规律,确定与掌纹主线走向对应的第一区域和第二区域;
    在所述第一区域内确定所述第一主线定位点对应的所述第一数据;及
    在所述第二区域内确定所述第二主线定位点对应的所述第二数据。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述掌纹主线分布规律,确定与掌纹主线走向对应的第一区域和第二区域,包括:
    根据所述掌纹主线分布规律,确定掌纹生成区域,所述掌纹生成区域用于框定掌纹主线的分布范围;
    在所述掌纹生成区域内确定呈对角关系的第一顶点和第二顶点;
    以所述第一顶点为中心,以第一预设长度为半径,在所述掌纹生成区域内确定所述第一区域;及
    以所述第二顶点为中心,以第二预设长度为半径,在所述掌纹生成区域内确定所述第二区域。
  4. 根据权利要求2所述的方法,其特征在于,所述在所述第一区域内确定所述第一主线定位点对应的所述第一数据,在所述第二区域内确定所述第二主线定位点对应的所述第二数据,包括:
    在所述第一区域内,以随机选取的方式确定所述第一主线定位点对应的所述第一数据;及
    在所述第二区域中,以随机选取的方式确定所述第二主线定位点对应的所述第二数据。
  5. 根据权利要求1所述的方法,其特征在于,所述根据掌纹主线弧度规律生成调节点数据,包括:
    根据所述掌纹主线弧度规律,基于所述第一主线定位点和所述第二主线定位点的位置关系,确定第三区域;及
    在所述第三区域内生成所述调节点数据。
  6. 根据权利要求5所述的方法,其特征在于,所述基于所述第一主线定位点和所述第二主线定位点的位置关系,确定第三区域,包括:
    连接所述第一主线定位点和所述第二主线定位点,得到目标线段;及
    以所述目标线段的线段中点为中心,将预设边长的矩形区域作为所述第三区域。
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述掌纹样本中还包括掌纹细纹;
    所述生成包含所述掌纹主线的至少一个掌纹样本,包括:
    确定至少两个掌纹细纹定位点;
    基于所述至少两个掌纹细纹定位点,生成所述掌纹细纹;及
    在预设的掌纹数量范围内,生成包含所述掌纹主线和所述掌纹细纹的至少一个掌纹样 本,所述掌纹数量范围包括掌纹主线数量范围和掌纹细纹数量范围中的至少一种。
  8. 根据权利要求7所述的方法,其特征在于,所述基于所述至少两个掌纹细纹定位点,生成所述掌纹细纹,包括:
    连接所述至少两个掌纹细纹定位点,得到掌纹细纹。
  9. 根据权利要求7所述的方法,其特征在于,所述基于所述至少两个掌纹细纹定位点,生成所述掌纹细纹,包括:
    基于所述至少两个掌纹细纹定位点,确定掌纹细纹调节点,所述掌纹细纹调节点用于控制所述至少两个掌纹细纹定位点之间的弧度;在预设的所述掌纹细纹数量范围内,基于所述至少两个掌纹细纹定位点和所述掌纹细纹调节点,确定掌纹细纹。
  10. 根据权利要求1至6任一所述的方法,其特征在于,所述生成包含所述掌纹主线的至少一个掌纹样本之后,还包括:
    获取样本图像集,所述样本图像集中存储有至少一个样本图像;
    以所述样本图像为背景,将所述掌纹样本嵌套在所述样本图像之上,得到目标图像;及
    以所述目标图像对所述掌纹识别模型进行训练。
  11. 根据权利要求10所述的方法,其特征在于,所述以所述样本图像为背景,将所述掌纹样本嵌套在所述样本图像之上,得到目标图像,包括:
    在目标扰动区间内,对所述至少一个掌纹样本进行扰动,得到目标样本;及
    以所述样本图像为背景,将所述目标样本嵌套在所述样本图像之上,得到目标图像。
  12. 根据权利要求11所述的方法,其特征在于,所述目标扰动区间包括掌纹主线扰动区间和掌纹细纹扰动区间;
    所述在目标扰动区间内,对所述至少一个掌纹样本进行扰动,得到目标样本,包括:
    在所述掌纹主线扰动区间内,对所述至少一个掌纹样本对应的掌纹主线进行扰动,得到扰动主线;
    在所述掌纹细纹扰动区间内,对所述至少一个掌纹样本对应的掌纹细纹进行扰动,得到扰动细纹;及
    基于所述扰动主线和所述扰动细纹,得到所述目标样本。
  13. 根据权利要求11所述的方法,其特征在于,所述对所述至少一个掌纹样本进行扰动,包括:
    对所述至少一个掌纹样本对应的掌纹主线增加噪声。
  14. 根据权利要求11所述的方法,其特征在于,所述对所述至少一个掌纹样本进行扰动,包括:
    对所述至少一个掌纹样本对应的掌纹细纹增加噪声。
  15. 根据权利要求10所述的方法,其特征在于,所述以所述目标图像对所述掌纹识别模型进行训练,包括:
    以所述目标图像对所述掌纹识别模型进行第一训练,得到候选掌纹识别模型;
    获取掌纹数据集,所述掌纹数据集中存储有至少一个掌纹数据,所述至少一个掌纹数据对应标注有数据标签;及
    以所述掌纹数据和所述掌纹数据对应的数据标签,对所述候选掌纹识别模型进行第二训练,得到目标掌纹识别模型,所述目标掌纹识别模型为对掌纹识别模型训练得到的模型。
  16. 根据权利要求15所述的方法,其特征在于,所述以所述掌纹数据和所述掌纹数据对应的数据标签,对所述候选掌纹识别模型进行第二训练,得到目标掌纹识别模型,包括:
    将所述掌纹数据输入所述候选掌纹识别模型,基于所述候选掌纹识别模型的输出数据和所述掌纹数据对应的数据标签,确定所述掌纹数据对应的损失值;
    以所述损失值对所述候选掌纹识别模型进行训练;及
    响应于对所述候选掌纹识别模型的训练达到训练目标,得到所述目标掌纹识别模型。
  17. 一种掌纹样本的生成装置,其特征在于,所述装置包括:
    定位点生成模块,用于根据掌纹主线分布规律生成定位点数据,所述定位点数据中包括第一主线定位点对应的第一数据和第二主线定位点对应的第二数据;
    调节点生成模块,用于根据掌纹主线弧度规律生成调节点数据,所述调节点数据对应的主线调节点用于控制所述第一主线定位点和所述第二主线定位点所构成的主线的弧度;
    主线生成模块,用于基于所述第一数据、所述第二数据和所述调节点数据生成掌纹主线,所述掌纹主线为依次连接所述第一主线定位点、所述主线调节点和所述第二主线定位点的曲线;及
    样本生成模块,用于生成包含所述掌纹主线的至少一个掌纹样本,所述掌纹样本用于对掌纹识别模型进行训练,所述掌纹识别模型用于进行掌纹识别。
  18. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至16任一所述的掌纹样本的生成方法。
  19. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如权利要求1至16任一所述的掌纹样本的生成方法。
  20. 一种计算机程序产品,其特征在于,包括计算机程序或指令,所述计算机程序或指令被处理器执行时实现如权利要求1至16任一所述的掌纹样本的生成方法。
PCT/CN2022/133470 2022-02-28 2022-11-22 掌纹样本的生成方法、装置、设备、介质及程序产品 WO2023160048A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/451,515 US20230394869A1 (en) 2022-02-28 2023-08-17 Method and apparatus for generating palmprint sample, device, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210189742.8A CN115527079B (zh) 2022-02-28 2022-02-28 掌纹样本的生成方法、装置、设备、介质及程序产品
CN202210189742.8 2022-02-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/451,515 Continuation US20230394869A1 (en) 2022-02-28 2023-08-17 Method and apparatus for generating palmprint sample, device, and medium

Publications (1)

Publication Number Publication Date
WO2023160048A1 true WO2023160048A1 (zh) 2023-08-31

Family

ID=84694911

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133470 WO2023160048A1 (zh) 2022-02-28 2022-11-22 掌纹样本的生成方法、装置、设备、介质及程序产品

Country Status (3)

Country Link
US (1) US20230394869A1 (zh)
CN (1) CN115527079B (zh)
WO (1) WO2023160048A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512530A (zh) * 2014-10-10 2016-04-20 富士通株式会社 生物信息校正装置和生物信息校正方法
CN108615002A (zh) * 2018-04-22 2018-10-02 广州麦仑信息科技有限公司 一种基于卷积神经网络的手掌静脉认证方法
CN110826452A (zh) * 2019-10-30 2020-02-21 平安科技(深圳)有限公司 一种掌纹验证方法、装置、计算机设备及可读存储介质
CN112149521A (zh) * 2020-09-03 2020-12-29 浙江工业大学 一种基于多任务卷积神经网络的掌纹roi提取与增强的方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392170B (zh) * 2017-08-01 2021-01-22 云南大学 一种符合自然生长规律的掌纹主线提取方法
GB201713099D0 (en) * 2017-08-15 2017-09-27 Norwegian Univ Of Science And Tech (Ntnu) A biometric cryptosystem
CN108427923B (zh) * 2018-03-08 2022-03-25 广东工业大学 一种掌纹识别方法及装置
CN109472213B (zh) * 2018-10-16 2023-04-18 平安科技(深圳)有限公司 掌纹识别方法、装置、计算机设备和存储介质
CN110163062B (zh) * 2018-11-20 2023-04-18 腾讯科技(深圳)有限公司 掌纹主线提取方法、装置、计算机设备及存储介质
CN112560805A (zh) * 2021-01-25 2021-03-26 李晓坤 一种掌纹识别方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512530A (zh) * 2014-10-10 2016-04-20 富士通株式会社 生物信息校正装置和生物信息校正方法
CN108615002A (zh) * 2018-04-22 2018-10-02 广州麦仑信息科技有限公司 一种基于卷积神经网络的手掌静脉认证方法
CN110826452A (zh) * 2019-10-30 2020-02-21 平安科技(深圳)有限公司 一种掌纹验证方法、装置、计算机设备及可读存储介质
CN112149521A (zh) * 2020-09-03 2020-12-29 浙江工业大学 一种基于多任务卷积神经网络的掌纹roi提取与增强的方法

Also Published As

Publication number Publication date
US20230394869A1 (en) 2023-12-07
CN115527079B (zh) 2023-07-14
CN115527079A (zh) 2022-12-27

Similar Documents

Publication Publication Date Title
US10839790B2 (en) Sequence-to-sequence convolutional architecture
US9754151B2 (en) Derived virtual quality parameters for fingerprint matching
Rajasekar et al. Enhanced multimodal biometric recognition approach for smart cities based on an optimized fuzzy genetic algorithm
Cao et al. Graph-based discriminative learning for location recognition
CN106203242B (zh) 一种相似图像识别方法及设备
WO2016023264A1 (zh) 指纹识别方法及其指纹识别装置
CN111027563A (zh) 一种文本检测方法、装置及识别系统
US10255477B2 (en) Feature-based matcher for distorted fingerprint matching
CN112528025A (zh) 基于密度的文本聚类方法、装置、设备及存储介质
CN103425964B (zh) 图像处理设备和图像处理方法
CN110414550B (zh) 人脸识别模型的训练方法、装置、系统和计算机可读介质
US11126827B2 (en) Method and system for image identification
WO2014082496A1 (zh) 客户端特征的识别方法、装置及存储介质
US20170140193A1 (en) Minutiae Grouping for Distorted Fingerprint Matching
CN113515988B (zh) 掌纹识别方法、特征提取模型训练方法、设备及介质
CN110503102A (zh) 车辆识别码检测方法、装置、计算机设备和存储介质
CN112668482B (zh) 人脸识别训练方法、装置、计算机设备及存储介质
CN114298122A (zh) 数据分类方法、装置、设备、存储介质及计算机程序产品
CN111552865A (zh) 用户兴趣画像方法及相关设备
US20210342432A1 (en) Decentralized biometric identification and authentication network
WO2020199498A1 (zh) 指静脉比对方法、装置、计算机设备及存储介质
US11036968B2 (en) Method and apparatus for pattern recognition
Zhang et al. A self-occlusion detection approach based on depth image using SVM
WO2023160048A1 (zh) 掌纹样本的生成方法、装置、设备、介质及程序产品
Liu et al. 3D models retrieval algorithm based on multimodal data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22928308

Country of ref document: EP

Kind code of ref document: A1