Biometric feature extraction model training method and image segmentation method

By performing data augmentation on the image set to generate positive and negative sample pairs, and training the biometric extraction model, the problems of high labor costs and annotation errors are solved, and efficient biometric extraction and image segmentation are achieved.

CN114882308BActive Publication Date: 2025-11-28JIHAO TECHNOLOGY (TIANJIN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210378236.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-11-28
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

The existing technology for training biometric extraction models is costly in terms of manpower and has low accuracy, mainly due to the need to label a large amount of data and the existence of labeling errors.

Method used

By performing data augmentation processing on images in an image set containing target biometric features, fixing and transforming pixel positions, positive and negative sample pairs are generated. Based on these sample pairs, a neural network is trained to achieve unsupervised training of a biometric feature extraction model.

Benefits of technology

It reduces labor costs, avoids annotation errors, and improves the ability of biometric feature extraction to express texture details, thereby improving the accuracy of biometric feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882308B_ABST
    Figure CN114882308B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a biological feature extraction model training method and an image segmentation method. An embodiment of the method comprises: performing data enhancement processing of fixed pixel positions on each first image in an image set containing a target biological feature to obtain a second image corresponding to each first image; performing data enhancement processing of transformed pixel positions on each second image to obtain a third image corresponding to each first image; combining each first image and the corresponding second image as a positive sample pair, and combining each first image and the corresponding third image as a negative sample pair; and training a neural network based on the obtained positive sample pairs and negative sample pairs to obtain a biological feature extraction model. This embodiment reduces the human cost of training the biological feature extraction model and improves the accuracy of biological feature extraction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer technology, in particular to a biological feature extraction model training method and an image segmentation method. BACKGROUND

[0002] With the development of computer technology, image segmentation technology has been widely applied in the field of computer vision. In the image recognition scene, it is usually necessary to perform image segmentation on the image to crop out the biological feature region in the image, so as to improve the accuracy of subsequent biological feature recognition.

[0003] In the prior art, a biological feature extraction model or an image segmentation model can be trained by manually annotating training data. This method requires a large amount of data to be annotated, so the labor cost is high. At the same time, due to the existence of annotation errors, the expression ability of biological features to texture details is weak, so the accuracy of biological feature extraction is low. SUMMARY

[0004] Embodiments of the present application propose a biological feature extraction model training method and an image segmentation method to solve the technical problems of high labor cost and low accuracy of biological feature extraction in training a biological feature extraction model in the prior art.

[0005] In a first aspect, embodiments of the present application provide a biological feature extraction model training method, which comprises: performing data enhancement processing of fixed pixel point positions on each first image in an image set containing a target biological feature to obtain a second image corresponding to each first image; performing data enhancement processing of transformed pixel point positions on each second image to obtain a third image corresponding to each first image; combining each first image and the corresponding second image as a positive sample pair, and combining each first image and the corresponding third image as a negative sample pair, training a neural network based on the obtained positive sample pair and negative sample pair to obtain a biological feature extraction model.

[0006] In a second aspect, embodiments of the present application provide a biological feature extraction method, which comprises: obtaining a target image; inputting the target image into a biological feature extraction model trained by the method described in the first aspect to obtain a biological feature map of the target image.

[0007] In a third aspect, embodiments of the present application provide an image segmentation method, which comprises: obtaining a target image; inputting the target image into a biological feature extraction model trained by the method described in the first aspect to obtain a biological feature map of the target image; determining a feature module length of each pixel point in the target image based on the biological feature map; and determining a biological feature region in the target image based on the feature module length.

[0008] In a fourth aspect, an electronic device is provided and includes one or more processors and a memory storing one or more programs configured to, working with the one or more processors, cause the one or more processors to implement a method as described in the first aspect, the second aspect, or the third aspect.

[0009] In a fifth aspect, a computer-readable medium is provided and stores a computer program configured to, working with a processor, cause the processor to implement a method as described in the first aspect, the second aspect, or the third aspect.

[0010] In a sixth aspect, a computer program product is provided and includes a computer program configured to, working with a processor, cause the processor to implement a method as described in the first aspect, the second aspect, or the third aspect.

[0011] The biological feature extraction model training method and the image segmentation method provided by the embodiments of the present application can obtain the second image corresponding to each first image by performing the data enhancement processing of the fixed pixel point position on each first image in the image set containing the target biological feature, then perform the data enhancement processing of the transformed pixel point position on each second image to obtain the third image corresponding to each first image, finally combine each first image and the corresponding second image as a positive sample pair, combine each first image and the corresponding third image as a negative sample pair, and train the neural network based on the obtained positive sample pair and negative sample pair to obtain the biological feature extraction model, thereby realizing the automatic generation of the positive and negative sample pairs and the unsupervised training of the biological feature extraction model. On the one hand, the biological feature extraction model can be trained without manual annotation of the training data, thereby reducing the labor cost. On the other hand, since the manual annotation link is omitted, there is no annotation error, and therefore the biological feature extraction model obtained by using this training method has stronger expression ability of the biological features on the texture details, thereby improving the accuracy of biological feature extraction. BRIEF DESCRIPTION OF DRAWINGS

[0012] Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments thereof as described in conjunction with the following drawings:

[0013] Figure 1 is a flowchart of an embodiment of the biological feature extraction model training method of the present application;

[0014] Figure 2 is a feature intensity comparison chart before and after the data enhancement processing of the fixed pixel point position on the first image in the biological feature extraction model training method of the present application;

[0015] Figure 3is a flowchart of one embodiment of the biometric feature extraction method of the present application;

[0016] Figure 4 is a flowchart of one embodiment of the image segmentation method of the present application;

[0017] Figure 5 is a schematic diagram of the processing effect of the image segmentation method of the present application;

[0018] Figure 6 is a structural schematic diagram of one embodiment of the biometric feature extraction model training device of the present application;

[0019] Figure 7 is a structural schematic diagram of one embodiment of the biometric feature extraction device of the present application;

[0020] Figure 8 is a structural schematic diagram of one embodiment of the image segmentation device of the present application;

[0021] Figure 9 is a structural schematic diagram of the computer system of the electronic device for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0022] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for ease of description.

[0023] It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0024] It should be noted that all actions of obtaining signals, information or data in the present application are carried out in accordance with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization of the owner of the corresponding device.

[0025] In recent years, biometric technology has been widely applied to various terminal devices or electronic devices. Biometric recognition technology includes, but is not limited to, fingerprint recognition, palmprint recognition, vein recognition, iris recognition, face recognition, living body recognition, anti-counterfeiting recognition, and the like. Among them, fingerprint recognition usually includes optical fingerprint recognition, capacitive fingerprint recognition, and ultrasonic fingerprint recognition. With the rise of full-screen technology, the fingerprint recognition module can be arranged in a partial area or an entire area under the display screen, thereby forming under-display optical fingerprint recognition; or, part or all of the optical fingerprint recognition module can be integrated into the display screen of the electronic device, thereby forming in-display optical fingerprint recognition. The display screen can be an organic light emitting diode (OLED) display screen or a liquid crystal display (LCD), etc. The fingerprint recognition method usually includes steps of image acquisition, preprocessing, feature extraction, feature matching, etc. Part or all of the above steps can be realized by traditional computer vision (CV) algorithm, or by deep learning algorithm based on artificial intelligence (AI). The fingerprint recognition technology can be applied to portable or mobile terminals such as smartphones, tablet computers, game devices, and the like, as well as other electronic devices such as smart door locks, cars, and bank automatic teller machines, for fingerprint unlocking, fingerprint payment, fingerprint attendance, identity authentication, etc.

[0026] In the field of biometric recognition, image segmentation is usually required to crop the biometric feature region in the image, so as to improve the accuracy of subsequent biometric recognition. In related technologies, a biometric feature extraction model or an image segmentation model can be trained by manually labeling training data. This method requires a large amount of data to be labeled, and therefore has a high labor cost. At the same time, due to the existence of labeling errors, the biometric feature has weak expression ability for texture details, and therefore the accuracy of biometric feature extraction is low. The present application provides a biometric feature extraction model training method which is beneficial to reducing labor cost and improving biometric feature accuracy.

[0027] Please refer to Figure 1 which shows a flow 100 of one embodiment of the biometric feature extraction model training method according to the present application. The biometric feature extraction model training method can be applied to various electronic devices. For example, it can include, but is not limited to, servers, desktop computers, laptop computers, etc. The biometric feature extraction model training method includes the following steps:

[0028] At step 101, the data enhancement processing of fixed pixel point position is performed on each first image in the image set containing the target biological feature to obtain a second image corresponding to each first image.

[0029] In this embodiment, the execution subject of the biological feature extraction model training method can obtain an image set containing a target biological feature in advance. The target biological feature can be any preset biological feature, such as a fingerprint feature, a palmprint feature, an iris feature, a lipprint feature, etc. Correspondingly, the image set containing the target biological feature can be a fingerprint image set, a palmprint image set, an iris image set, or a lipprint image set. The above image set can be obtained in various ways. For example, the existing image set stored in another server (such as a database server) for storing training data can be obtained from the server through wired or wireless connection. For another example, the images can be collected by a terminal device, and the collected images can be summarized into an image set. The image collection environment (such as an image collection module, collection temperature, etc.) and the finger state (such as finger temperature, finger humidity, pressing force, etc.) in the image set can be diverse to ensure the difference of the images and improve the generalization of the trained biological feature extraction model.

[0030] In this embodiment, the execution subject can take each image in the image set as a first image, perform data enhancement processing of fixed pixel point position on each first image, and obtain a second image corresponding to each first image. The data enhancement refers to a technique of generating similar but different data by making a series of random changes to the data. Through data enhancement processing, the size of the data set can be expanded. The data enhancement processing of fixed pixel point position can include data enhancement processing of fixed pixel point position and data enhancement processing of transformed pixel point position.

[0031] In some optional implementation manners of this embodiment, the data enhancement processing of fixed pixel point position can include but is not limited to at least one of the following: Gaussian blur processing, random noise processing, brightness transformation, contrast transformation, hue transformation, and saturation transformation. For each first image, the execution subject can perform at least one of the following processing on the first image data: Gaussian blur processing, random noise processing, brightness transformation, contrast transformation, hue transformation, and saturation transformation, to obtain a second image corresponding to the first image.

[0032] As an example, Figure 2 A feature intensity comparison diagram before and after the data enhancement processing of fixed pixel point position on the first image is shown. The biological feature map of the original first image is shown as reference numeral 201. After the data enhancement processing of fixed pixel point position on the first image, the biological feature map is shown as reference numeral 202, and the feature intensity changes compared with the biological feature map shown as reference numeral 201.

[0033] It should be noted that the fixed pixel position data augmentation processing can include but is not limited to the above enumeration, which will not be repeated here.

[0034] In step 102, the second image is subjected to pixel position transformation data augmentation processing to obtain a third image corresponding to the first image.

[0035] In this embodiment, after obtaining the second image corresponding to the first image, the execution subject can perform pixel position transformation data augmentation processing on the second image to obtain a third image corresponding to the second image, that is, a third image corresponding to the first image.

[0036] In some optional implementations of this embodiment, the pixel position transformation data augmentation processing can include but is not limited to at least one of the following: flipping, rotating, translating, and mirroring. For each first image, the execution subject can perform at least one of flipping, rotating, translating, and mirroring on the second image corresponding to the first image to obtain a third image corresponding to the first image. It should be noted that the first image and the third image can have the same size. For example, if a rotation operation is performed, the image after rotation can be cropped or processed to have the same size as the first image.

[0037] In step 103, each first image and the corresponding second image are combined as a positive sample pair, and each first image and the corresponding third image are combined as a negative sample pair. Based on the obtained positive sample pair and negative sample pair, the neural network is trained to obtain a biological feature extraction model.

[0038] In this embodiment, since the second image is obtained by performing fixed pixel position data augmentation processing on the first image, the biological feature lines (such as fingerprint lines, palm print lines, and lip print lines) in the first image and the corresponding second image have the same position. Therefore, each first image and its corresponding second image can be combined as a positive sample pair. Since the third image is obtained by performing pixel position transformation data augmentation processing on the first image, the biological feature lines (such as fingerprint lines, palm print lines, and lip print lines) in the first image and the corresponding third image have different positions. Therefore, each first image and its corresponding second image can be combined as a negative sample pair. Furthermore, based on the obtained positive sample pair and negative sample pair, the neural network can be trained to obtain a biological feature extraction model.

[0039] Here, the training target of the model can be to narrow the feature distance of the positive sample pair, while expanding the feature distance of the negative sample pair. Taking the training of the fingerprint feature extraction model as an example, the above training target can make the model extract the same biological features from images with the same fingerprint lines as possible, so as to ensure that the model can extract the same features from the same fingers in different acquisition environments and finger states as possible, thereby improving the accuracy of subsequent fingerprint recognition; at the same time, the model can make the biological features extracted from images with different fingerprint lines as different as possible, so as to avoid the model from collecting similar features from different fingers, thereby causing subsequent fingerprint recognition errors. Wherein, the similarity of the features is measured by the Euclidean distance between the features. After training, the length of the biological features extracted from the clear area is longer than the length of the biological features extracted from the fuzzy area, so that the region of the biological features in the image to be recognized can be determined based on the length of the features, thereby facilitating subsequent biological feature recognition, image segmentation, etc.

[0040] In the embodiment, the neural network can be a convolutional neural network (CNN) using various existing structures (e.g., UNet, etc.). In practice, the convolutional neural network is a kind of feedforward neural network, the artificial neurons of which can respond to a part of the surrounding units within the coverage range, and have excellent performance for image processing, so that the convolutional neural network can be used to extract the frame features in the sample video. In the embodiment, the neural network can include but is not limited to convolutional layers and deconvolutional layers, etc. The convolutional layer can be used to extract image features and perform down sampling of the feature map. The deconvolutional layer can be used to extract image features and perform up sampling of the feature map. The neural network used here can have the same size of the output feature map as the input image to the neural network.

[0041] In some optional implementation manners of the embodiment, the above execution subject can train the biological feature extraction model by using the following sub-steps:

[0042] In the sub-step S11, a triple is generated based on the positive sample pair and the negative sample pair containing the same first image. The triple can include the first image, the second image in the positive sample pair to which the first image belongs, and the third image in the negative sample pair to which the first image belongs. For each first image, a triple can be constructed, so that a plurality of triples can be obtained. Each triple can be used as a training sample, and a plurality of samples can constitute a sample set for training the biological feature extraction model. The sample set is generated based on the unannotated image set, which realizes the unsupervised training of the biological feature extraction model, reduces the labor cost, and avoids annotation errors.

[0043] In the sub-step S12, the following model training steps are iteratively performed:

[0044] Firstly, target triplets are extracted from the obtained triplets. The manner and number of extraction of the target triplets are not limited in the present application. For example, at least one target triplet can be extracted randomly, or at least one target triplet can be extracted in a specified order.

[0045] Secondly, the target triplets are input into the neural network to obtain first, second and third feature maps. Here, the first, second and third feature maps can be biological feature maps corresponding to the first, second and third images in the target triplets, respectively.

[0046] Thirdly, based on the first, second, third feature maps and a preset triplet loss function, a loss value of the neural network is determined. Here, the loss value is a value of the loss function. The loss function is a non-negative real value function, which can be used to represent the difference between the detection result and the true result. Generally, the smaller the loss value, the better the robustness of the model. The loss function can be set according to actual needs, and here a triplet loss function can be used.

[0047] Fourthly, based on the loss value, the parameters of the neural network are updated. Here, the gradient of the loss value with respect to the parameters of the neural network can be obtained by using a back propagation algorithm, and then the parameters of the neural network are updated based on the gradient by using a gradient descent algorithm. Specifically, the gradient of the loss value with respect to the parameters of each layer of the neural network can be obtained by using the chain rule and the back propagation algorithm (BP algorithm). In practice, the above back propagation algorithm can also be called error back propagation (BP) algorithm, or error reverse propagation algorithm, which is a learning algorithm suitable for multi-layer neural network. During the back propagation process, the partial derivative of the loss function with respect to each neuron weight can be calculated layer by layer to form the gradient of the loss function with respect to the weight vector, which serves as the basis for modifying the weight. The gradient descent algorithm is a commonly used method for solving model parameters in the field of machine learning. When solving the minimum value of the loss function, the neuron weights (such as the parameters of the convolution kernel in the convolution layer) can be adjusted based on the calculated gradient by using the gradient descent algorithm.

[0048] In response to the stopping iteration condition being met, the iteration is stopped to obtain the biometric feature extraction model. Here, the parameters of the neural network can be updated once based on the loss value of the neural network for each input of the target triple until the stopping iteration condition is met. In practice, the stopping iteration condition can be variously set as needed. For example, when the number of times of training of the neural network is equal to a preset number of times, it can be determined that the training is completed. For another example, when the loss value of the neural network converges, it can be determined that the training is completed. When the training of the neural network is completed, the trained neural network can be determined as the biometric feature extraction model.

[0049] The method provided by the above embodiments of the present application can obtain the second image corresponding to each first image in the image set by performing the data enhancement processing of the fixed pixel position on each first image; then perform the data enhancement processing of the transformed pixel position on each second image to obtain the third image corresponding to each first image; finally, combine each first image and the corresponding second image as a positive sample pair, combine each first image and the corresponding third image as a negative sample pair, and train the neural network based on the obtained positive sample pair and negative sample pair to obtain the biometric feature extraction model, thereby realizing the automatic generation of the positive and negative sample pairs and the unsupervised training of the biometric feature extraction model. On the one hand, the biometric feature extraction model can be trained without manual annotation of training data, thereby reducing the labor cost. On the other hand, since the manual annotation link is omitted, there is no annotation error, and therefore the biometric feature extraction model obtained by using this training method has stronger expression ability for texture details of the biometric feature, thereby improving the accuracy of biometric feature extraction.

[0050] Further reference is made to Figure 3 which shows a flow 300 of one embodiment of a biometric feature extraction method. The biometric feature extraction method can be applied to various electronic devices. For example, the electronic devices can include, but are not limited to, a smart phone, a tablet computer, a laptop computer, an in-vehicle computer, a palm computer, a desktop computer, a set-top box, a smart television, a camera, a wearable device, etc.

[0051] The flow 300 of the biometric feature extraction method includes the following steps:

[0052] In step 301, a target image is obtained.

[0053] In this embodiment, the execution subject of the biometric feature extraction method can obtain a target image, which can be any image to be subjected to biometric feature extraction, such as a fingerprint image input by a user in a fingerprint collection area, a palmprint input in a palmprint collection area, etc.

[0054] In step 302, the target image is input to a biometric feature extraction model to obtain a biometric feature map of the target image.

[0055] In this embodiment, the execution subject can input the target image into the biometric feature extraction model to obtain a biometric feature map of the target image. The biometric feature extraction model can be trained by using the biometric feature extraction model training method described in the above embodiments. The specific generation process can be described in the above embodiments, and will not be described here.

[0056] After extracting the biometric feature map, other processing can be performed on the biometric feature map as needed, such as biometric feature recognition, biometric feature region segmentation, etc., which are not limited here.

[0057] The biometric feature extraction method of this embodiment can be used to extract biometric features in an image. The extracted biometric features have stronger expression ability for texture details, thereby improving the accuracy of biometric feature extraction.

[0058] Further reference Figure 4 is shown in FIG. 4, which shows a flow 400 of an embodiment of an image segmentation method. The image segmentation method can be applied to various electronic devices. For example, it can include, but is not limited to: a smart phone, a tablet computer, a laptop computer, a vehicle-mounted computer, a palm computer, a desktop computer, a set-top box, a smart television, a camera, a wearable device, etc.

[0059] The flow 400 of the image segmentation method includes the following steps:

[0060] Step 401, obtaining a target image.

[0061] In this embodiment, the execution subject of the image segmentation method can obtain a target image. The target image can be any image to be subjected to biometric feature extraction, such as a fingerprint image entered by a user in a fingerprint collection area, a palmprint entered in a palmprint collection area, etc.

[0062] Step 402, inputting the target image into a biometric feature extraction model to obtain a biometric feature map of the target image.

[0063] In this embodiment, the execution subject can input the target image into the biometric feature extraction model to obtain a biometric feature map of the target image. The biometric feature extraction model can be trained by using the biometric feature extraction model training method described in the above embodiments. The specific generation process can be described in the above embodiments, and will not be described here.

[0064] Step 403, determining a feature module length of each pixel point in the target image based on the biometric feature map.

[0065] In this embodiment, the execution body can determine the feature module length of each pixel point in the target image based on the biometric feature map. For each pixel point, the feature module length of the pixel point is the feature module length of the corresponding feature point in the biometric feature map, that is, the module length of the feature values of the corresponding feature point in each channel of the biometric feature map. The module length can be calculated by taking the square root of the sum of the squares of the feature values.

[0066] As an example, the size of the image and the feature map can be the same. At this time, for each feature point in the biometric feature map, the execution body can first determine the feature module length corresponding to the feature point based on the feature values of the feature point in each channel of the biometric feature map. That is, the square root of the sum of the squares of the feature values of the feature point in each channel is calculated to obtain the feature module length. Then, the feature module length is determined as the feature module length of the pixel point corresponding to the feature point in the image. It should be noted that the feature map can include one or more channels, and the number of channels can be determined based on the number of convolution kernels of the last convolution layer, and the specific value of the number of channels is not limited here.

[0067] Step 404, determining the biometric feature region in the target image based on the feature module length.

[0068] In this embodiment, the feature module length of the feature extracted by the biometric feature extraction model for the clear region (such as the fingerprint region, the palm print region, the lip print region, or the iris region, etc.) is longer than the feature module length of the feature extracted for the blurred region (such as the background region). After obtaining the feature module length of each pixel point in the target image, the execution body can obtain a module length map in which the feature module length is used as the pixel value. Based on the module length map, the execution body can determine the biometric feature region (such as the fingerprint region, the palm print region, the lip print region, or the iris region, etc.) in the target image. As an example, the region formed by the pixel points with a module length value greater than a preset threshold can be determined as the target region. As another example, the module length map can be first processed (such as truncation, normalization, or correction, etc.) to obtain a processed module length map. Then, the region formed by the pixel points with a module length value greater than a preset threshold in the processed module length map is determined as the biometric feature region. In this way, effective segmentation of the image is realized.

[0069] In some optional implementations of this embodiment, the execution body can determine the biometric feature region in the target image by the following steps:

[0070] First, adjust the feature module length greater than the first threshold to the first threshold to avoid the influence of outliers on subsequent processing.

[0071] Second, normalize the feature module length of each pixel point. For example, the feature module length of each pixel point after the first step can be divided by the first threshold to normalize the feature module length of each pixel point, so that the data is easier to process.

[0072] Thirdly, the feature module length of each pixel point after normalization processing is corrected, and the region composed of the pixel points greater than the second threshold after correction is determined as the biometric feature region. Here, image correction methods such as gamma correction can be used to adjust the pixel value distribution, facilitating threshold control. After correction, the region composed of the pixel points greater than the second threshold can be determined as the biometric feature region. In this way, effective segmentation of the image is realized. Based on the determined biometric feature region, subsequent biometric feature recognition and other operations can be facilitated.

[0073] As an example, Figure 5 is a schematic diagram of the processing effect of the image segmentation method. The original image is a fingerprint image, as shown by reference numeral 501. The image after processing according to the optional implementation manner described above is shown by reference numeral 502, and the biometric feature region, i.e., the fingerprint region, can be effectively segmented in the image.

[0074] The image segmentation method of the embodiment can be used to extract biometric features in the image, and the extracted biometric features have stronger expression ability for texture details, thereby improving the accuracy of biometric feature extraction and further improving the accuracy of image segmentation.

[0075] Further referring to Figure 6 , as an implementation of the method shown in the above figures, the present application provides an embodiment of a biometric feature extraction model training apparatus, which corresponds to the method embodiment shown in Figure 1 , and the apparatus can be specifically applied in various electronic devices.

[0076] As shown in Figure 6 , the biometric feature extraction model training apparatus 600 of the embodiment includes a first processing unit 601 configured to perform fixed pixel position data enhancement processing on each first image in an image set containing a target biometric feature to obtain a second image corresponding to each first image; a second processing unit 602 configured to perform variable pixel position data enhancement processing on each second image to obtain a third image corresponding to each first image; a training unit 603 configured to combine each first image and the corresponding second image as a positive sample pair, combine each first image and the corresponding third image as a negative sample pair, train a neural network based on the obtained positive sample pair and negative sample pair, and obtain a biometric feature extraction model.

[0077] In some optional implementation forms of the embodiment, the training unit 603 is further configured to: generate triplets based on the positive sample pairs and the negative sample pairs containing the same first image; and iteratively perform the following model training steps: extracting a target triplet from the obtained triplets; inputting the target triplet into the neural network to obtain the first feature map, the second feature map and the third feature map; determining a loss value of the neural network based on the first feature map, the second feature map, the third feature map and a preset triplet loss function; updating parameters of the neural network based on the loss value; and stopping iteration in response to a stop iteration condition being met, to obtain the biometric feature extraction model.

[0078] In some optional implementation forms of the embodiment, the second processing unit 602 is further configured to: for each first image, perform at least one of flipping, rotating, translating and mirroring on the second image corresponding to the first image to obtain a third image corresponding to the first image.

[0079] In some optional implementation forms of the embodiment, the first processing unit 601 is further configured to: for each first image in the image set containing the target biometric feature, perform at least one of Gaussian blur processing, random noise processing, brightness transformation, contrast transformation, hue transformation and saturation transformation on the first image data to obtain a second image corresponding to the first image.

[0080] The apparatus provided by the above embodiment of the present disclosure implements automatic generation of positive and negative sample pairs and unsupervised training of the biometric feature extraction model by performing fixed pixel position data enhancement processing on each first image in the image set to obtain a second image corresponding to the first image, then performing variable pixel position data enhancement processing on each second image to obtain a third image corresponding to the first image, and finally combining each first image with the corresponding second image as a positive sample pair and combining each first image with the corresponding third image as a negative sample pair, and training the neural network based on the obtained positive and negative sample pairs to obtain the biometric feature extraction model. On the one hand, the biometric feature extraction model can be trained without manual annotation of training data, thereby reducing labor costs. On the other hand, since the manual annotation step is omitted, there is no annotation error, and therefore the biometric feature extraction model obtained in this way has stronger expression ability for texture details, thereby improving the accuracy of biometric feature extraction.

[0081] Further reference Figure 7 As an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a biometric feature extraction apparatus, which corresponds to the method embodiment shown in Figure 1 The apparatus can be applied in various electronic devices.

[0082] As shown in Figure 7 The biological feature extraction device 700 of the embodiment includes an acquisition unit 701 configured to acquire a target image, and a feature extraction unit 702 configured to input the target image into a biological feature extraction model to obtain a biological feature map of the target image.

[0083] In the embodiment, the biological feature extraction model can be trained by using the biological feature extraction model training method described in the above embodiments. The specific generation process can be described in the above embodiments, which will not be described here.

[0084] The device provided by the above embodiments of the present application can be used to extract biological features in an image. The extracted biological features have stronger expression ability for texture details, thereby improving the accuracy of biological feature extraction.

[0085] Further referring to Figure 8 , as an implementation of the method shown in the above figures, the present application provides an embodiment of an image segmentation device, which corresponds to the method embodiment shown in Figure 1 The device can be applied to various electronic devices.

[0086] As shown in Figure 8 The image segmentation device 800 of the embodiment includes an acquisition unit 801 configured to acquire a target image, a feature extraction unit 802 configured to input the target image into a biological feature extraction model to obtain a biological feature map of the target image, a first determination unit 803 configured to determine the feature norm of each pixel point in the target image based on the biological feature map, and a second determination unit 804 configured to determine a biological feature region in the target image based on the feature norm.

[0087] In some optional implementations of the embodiment, the second determination unit is further configured to adjust the feature norm greater than a first threshold to the first threshold, normalize the feature norm of each pixel point, correct the feature norm of each pixel point after normalization, and determine the region composed of the pixel points greater than a second threshold after correction as the biological feature region.

[0088] In some optional implementations of the embodiment, the image and the feature map have the same size; the first determination unit is further configured to, for each feature point in the biological feature map, determine the feature norm corresponding to the feature point based on the feature values of the feature point in each channel of the biological feature map, and determine the feature norm corresponding to the feature point as the feature norm of the pixel point corresponding to the feature point in the target image.

[0089] The device provided by the above embodiments of the present application can be used to extract a biological feature in an image, the extracted biological feature has stronger expression capability for texture details, thereby improving the accuracy of biological feature extraction, and further improving the accuracy of image segmentation.

[0090] The embodiments of the present application also provide an electronic device, including one or more processors, a storage device having one or more programs stored thereon, and when the one or more programs are executed by the one or more processors, the one or more processors implement the above biological feature extraction model training method.

[0091] Reference is made below to Figure 9 which shows a structural schematic diagram of an electronic device for implementing some embodiments of the present application. Figure 9 The electronic device shown is merely an example and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0092] As Figure 9 shown, the electronic device 900 can include a processing device (for example, a central processor, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0093] Generally, the following devices can be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic disk, a hard disk, etc.; and a communication device 909. The communication device 909 can allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 9 The electronic device 900 is shown with various devices, but it should be understood that all the shown devices are not required to be implemented or possessed. More or fewer devices can be alternatively implemented or possessed. Figure 9 Each block shown in the flowchart in

[0094] The embodiments of the present application also provide a computer program product, including a computer program, which, when executed by a processor, implements the above biological feature extraction model training method.

[0095] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of some embodiments of the present application are performed.

[0096] The embodiments of the present application also provide a computer readable medium, which stores a computer program, and the computer program is executed by a processor to implement the above-mentioned biological feature extraction model training method.

[0097] It should be noted that the computer readable medium of some embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In some embodiments of the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, a RF (radio frequency) or the like, or any suitable combination of the above.

[0098] In some embodiments, the client, server, or other computing devices can communicate information using any known or future developed end-to-end communication protocol, such as the HyperText Transfer Protocol (HTTP), and can be interconnected via any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current or future developed network.

[0099] The computer-readable medium or media can be of an electronic, magnetic, optical, electromagnetic, infrared, semiconductor system, or a spread-spectrum high frequency or carrier wave or any other propagated data communication medium currently known or future developed, or any combination thereof. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disc, an optical disk, or a compact disk read-only memory (CD-ROM).

[0100] Computer program code for carrying out operations of some embodiments of the application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network ("LAN") or a wide area network ("WAN"), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0101] The computer program product of the first aspect can include a computer readable storage medium. The computer readable storage medium can include instructions. The instructions can include one or both of: instructions for causing a computer to implement a method as described above; and instructions for causing a computer to operate based on a system as described above. The computer readable storage medium can include one or more of: a magnetic disk; a magnetic disk drive; a magnetic tape; a magneto-optical drive; a solid state drive; a semiconductor drive; a flash drive; an optical drive; a holographic drive; a holographic medium; a memory; a programmable logic device (PLD); a programmable read-only memory (PROM); an erasable programmable read-only memory (EPROM); an electrically erasable programmable read-only memory (EEPROM); a compact disc read-only memory (CD-ROM); and a digital versatile disc (DVD). The computer readable storage medium can be a non-transitory computer readable medium. The computer readable storage medium can be a computer readable medium that is tangible. The computer readable storage medium can be a computer readable medium that is not a transitory propagating signal.

[0102] The units described in some embodiments of the present application can be implemented by software, or by hardware. The described units can also be arranged in a processor, for example, a processor can be described as comprising a first determining unit, a second determining unit, a selecting unit and a third determining unit. In some cases, the names of the units do not constitute a limitation on the units themselves.

[0103] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, example types of hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), etc.

[0104] The above description is merely exemplary of some of the numerous possible embodiments of the present application and of the ways in which the application can be implemented. Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. For example, variations and modifications of the described embodiments can be made based on the description set forth herein, once the benefits of the present application are understood. It is therefore intended that the present application not be limited to the described embodiments, but to be only limited as claimed below.

Claims

1. A method for training a biometric feature extraction model, characterized in that, The method includes: Data augmentation processing with fixed pixel positions is performed on each first image in the image set containing the target biometric features to obtain a second image corresponding to each first image; Data augmentation processing is performed on each second image to transform the pixel positions, resulting in a third image corresponding to each first image. Each first image is combined with its corresponding second image to form a positive sample pair, and each first image is combined with its corresponding third image to form a negative sample pair. Based on the obtained positive and negative sample pairs, the neural network is trained to obtain a biometric feature extraction model.

2. The method according to claim 1, characterized in that, The process of training the neural network based on the obtained positive and negative sample pairs to obtain a biometric feature extraction model includes: Triples are generated based on positive and negative sample pairs containing the same first image; The model training process is iteratively executed as follows: extracting target triples from the obtained triples; inputting the target triples into the neural network to obtain a first feature map, a second feature map, and a third feature map; determining the loss value of the neural network based on the first feature map, the second feature map, the third feature map, and a preset triple loss function; and updating the parameters of the neural network based on the loss value. The iteration stops when the stopping condition is met, and the biometric extraction model is obtained.

3. The method according to claim 1, characterized in that, The data augmentation process of transforming the pixel positions of each second image to obtain the third image corresponding to each first image includes: For each first image, perform at least one of the following operations on the corresponding second image: flip, rotate, translate, or mirror, to obtain the third image corresponding to the first image.

4. The method according to any one of claims 1-3, characterized in that, The step of performing fixed-pixel-position data augmentation processing on each first image in the image set containing the target biometric features to obtain a second image corresponding to each first image includes: For each first image in the image set containing the target biometric features, the first image data is processed by at least one of Gaussian blurring, random noise processing, brightness transformation, contrast transformation, hue transformation, and saturation transformation to obtain the second image corresponding to the first image.

5. A method for extracting biometric features, characterized in that, The method includes: Acquire the target image; The target image is input into a biometric extraction model trained using any one of the methods described in claims 1-4 to obtain a biometric map of the target image.

6. An image segmentation method, characterized in that, The method includes: Acquire the target image; The target image is input into a biometric extraction model trained using any one of the methods described in claims 1-4 to obtain a biometric map of the target image; Based on the biometric map, the feature modulus of each pixel in the target image is determined; Based on the feature modulus, the biometric regions in the target image are determined.

7. The method according to claim 6, characterized in that, The step of determining the biometric region in the target image based on the feature modulus includes: Adjust the feature magnitude that is greater than the first threshold to the first threshold; Normalize the feature magnitude of each pixel; The feature magnitude of each pixel after normalization is corrected, and the region formed by pixels whose corrected feature magnitude is greater than the second threshold is determined as the biometric region.

8. The method according to claim 6, characterized in that, The target image and the biometric map have the same size; determining the feature modulus of each pixel in the target image based on the biometric map includes: For each feature point in the biometric map, based on the feature value of the feature point in each channel of the biometric map, the feature modulus corresponding to the feature point is determined, and the feature modulus corresponding to the feature point is determined as the feature modulus of the pixel point corresponding to the feature point in the target image.

9. An electronic device, characterized in that, include: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Image recognition model training method, image recognition method and related device

    CN111368934A

  • Neural network model training method, image feature extraction method and related device

    CN113657411A