WO2020253505A1 - Palm image detection method and apparatus - Google Patents

Palm image detection method and apparatus Download PDF

Info

Publication number
WO2020253505A1
WO2020253505A1 PCT/CN2020/093510 CN2020093510W WO2020253505A1 WO 2020253505 A1 WO2020253505 A1 WO 2020253505A1 CN 2020093510 W CN2020093510 W CN 2020093510W WO 2020253505 A1 WO2020253505 A1 WO 2020253505A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
positive
sample
training
negative
Prior art date
Application number
PCT/CN2020/093510
Other languages
French (fr)
Chinese (zh)
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 平安科技(深圳)有限公司
Publication of WO2020253505A1 publication Critical patent/WO2020253505A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • 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/1365Matching; Classification

Definitions

  • This application relates to the technical field of image processing based on neural networks, in particular to a method and device for detecting palm images.
  • the palmprint recognition technology uses the characteristics of human palm patterns to identify the identity.
  • the specific process includes: first take a picture of the user's palm to be tested, and then extract the palmprints of the palm of the palm to be tested and match the palmprints stored in the system. If the matching is successful, the palmprint recognition is considered successful, and the user's identity is legal.
  • the process of extracting palm prints in the palm image to be tested it is usually necessary to first determine whether the captured image contains valid palm prints, and then perform subsequent palm print extraction operations.
  • the edge of the image is detected first, and then the training results of the effective palm image and the invalid palm image by the SVM classifier are used to determine whether the palm image to be tested contains a valid palm image.
  • the SVM classifier is trained using image gray gradient information. of.
  • the inventor realizes that if the palm image to be tested includes palm, arm, and face images with similar colors, especially when images with similar colors overlap, the gray information corresponding to the images with similar colors is basically the same, and gray information cannot be passed.
  • the palm, arm and face are distinguished, so it is difficult to accurately judge whether the palm image to be tested contains a valid palm image by using the gray gradient information.
  • the present application provides a palm image detection method and device, the main purpose of which is to solve the problem of low accuracy in determining whether the palm image to be tested includes a palm image in the prior art.
  • a method for detecting palm images including: using a solid mask to mark a palm image in a training image, and obtaining the palm image; within the image pixel range of the training image, according to random The image size and pixel position calculated by the function are used to intercept the sub-images in the training image; if the sub-image contains the palm image, the sub-image is determined to be a positive sample image, and statistics of the positive sample image The number of positive samples; if the sub-image does not completely contain the palm image, the sub-image is determined to be a negative sample image, and the number of negative samples of the negative sample image is counted; if the number of positive samples is less than the preset minimum The number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again; if the number of positive samples is not less than the preset minimum number of positive samples, and the If the number of negative samples is not less than the preset minimum
  • a palm image detection device including: a marking module for marking the palm image in the training image with a solid mask, and obtaining the palm image; Within the image pixel range of the training image, the sub-image in the training image is intercepted according to the image size and pixel position calculated by a random function; the determining module is used to determine if the sub-image contains the palm image The sample image is a positive sample image, and the number of positive samples of the positive sample image is counted; the determining module is further configured to determine that the sample image is a negative sample if the sub-image does not completely contain the palm image Image, and count the number of negative samples of the negative sample image; the intercepting module is used for if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then Intercepting the sub-images in the training image again; an extraction module for if the number of positive samples is not less than the preset minimum number
  • a storage medium in which at least one executable instruction is stored, and the executable instruction causes a processor to perform the following steps: using a solid mask to mark the training image The palm image of the training image, and obtain the palm image; within the image pixel range of the training image, according to the image size and pixel position calculated by the random function, intercept the sub-image in the training image; if the sub-image contains For the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image; if the sub-image does not completely contain the palm image, determine that the sub-image is a negative sample Image, and count the number of negative samples of the negative sample image; if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the training image is captured again If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the prese
  • a computer device including: a processor, a memory, a communication interface, and a communication bus.
  • the processor, the memory, and the communication interface complete mutual communication through the communication bus.
  • Communication; the memory is used to store at least one executable instruction, the executable instruction causes the processor to perform the following steps: use a solid mask to mark the palm image in the training image, and obtain the palm image; Within the image pixel range of the training image, the sub-image in the training image is intercepted according to the image size and pixel position calculated by a random function; if the sub-image includes the palm image, it is determined that the sub-image is Positive sample image, and count the number of positive samples of the positive sample image; if the sub-image does not completely contain the palm image, determine that the sub-image is a negative sample image, and count the negative samples of the negative sample image Number; if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative
  • the negative sample image generates a sample training set; the positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the training image
  • the weight parameter of the image feature the image feature includes shape, color and shadow; according to the weight parameter, the feature vector value of the image to be measured is calculated; according to the feature vector value, it is judged whether the image to be measured contains the palm image .
  • the technical solution provided by the embodiments of the present application obtains positive sample images or negative sample images by marking the palm images in the training images to improve the accuracy of the training samples, so as to improve the accuracy of the weight parameters of image features obtained by training based on the training samples.
  • the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
  • Fig. 1 shows a flowchart of a palm image detection method provided by an embodiment of the present application
  • FIG. 2 shows a flowchart of another palm image detection method according to an embodiment of the present application
  • Figure 3 shows a block diagram of a palm image detection device provided by an embodiment of the present application
  • FIG. 4 shows a block diagram of another palm image detection composition provided by an embodiment of the present application.
  • Fig. 5 shows a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the palmprint recognition process it is usually necessary to first determine whether the captured image contains a valid palmprint pattern. If it is determined that the captured image contains a valid palmprint pattern, then perform subsequent palmprint extraction and recognition operations.
  • the actual image to be measured in addition to the palm, it may also include images of objects that are similar in color to the palm, and the images of near-colored objects may also overlap, so that the hands in the image to be measured can be accurately identified and segmented.
  • the shape is particularly difficult.
  • the purpose of the embodiments of the present application is to improve the accuracy of determining whether a palm image is included in the image to be tested.
  • the embodiment of the application provides a method for detecting a palm image. As shown in FIG. 1, the method includes:
  • the training image is a preset image that can fully and correctly identify the palm image in the image.
  • the palm image is not a specific image with the same palmprint features, but an image corresponding to a real palm in any image. In the embodiment of the present application, it refers to the palm image in the training image or the palm image in the image to be tested.
  • Masking in image processing refers to the use of selected images, graphics or objects to block the training image in order to control the area or process of image processing.
  • the solid mask means that when the training image is occluded, the area within the marked pixels is completely occluded, and the occluded area is the palm image.
  • the pixel matrix of the training image is [23,22 ,89;0,0,255;90,0,23]
  • the palm image mask is [0,0,1;1,0,1;1,1,1]
  • the pixel matrix of the palm image obtained after the dot product is [0,0,89;0,0,255;90,0,23].
  • the sub-image is a part of the training image, and the size of the sub-image is not limited in the embodiment of the present application.
  • Use a random function to calculate the first random value within the image pixel range of the training image the first random value is the image size of the sub-image, the shape of the sub-image is rectangular, and the first random value includes the width and height of the sub-image .
  • a random function is used to calculate a second random value within the image pixel range of the training image, and the second random value is the pixel position of the sub-image. Then take the pixel position as the starting point and the image size as the selected area to intercept the sub-images in the training image.
  • the vertex of the selected area When capturing an image, first set the starting point of which vertex of the selected area, the vertex of the selected area can be the upper left corner, the lower left corner, the upper right corner or the lower right corner, and then determine the set vertex position and the size of the selected area , To intercept the sub-images in the training image.
  • the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image.
  • the sub-image is compared with the palm image to determine whether the sub-image contains the palm image. If the palm image is completely contained in the sub-image, the sub-image is determined to be a positive sample image.
  • the sub-image does not completely include the palm image, determine that the sub-image is a negative sample image, and count the number of negative samples of the negative sample image.
  • This step is parallel to step 103 and is similar to step 103.
  • the process of judging whether the sub-image contains the palm image is the same. If the sub-image does not completely contain the palm image, that is, the marked position of the palm image in the training image is not all If it falls within the image boundary corresponding to the sub-image, it is determined that the sub-image is a negative sample image. If the sub-image is a negative sample image, the value of the number of negative samples corresponding to the negative sample image is increased by one.
  • the sub-images in the training image are captured again.
  • a sub-image Every time a sub-image is taken, after determining whether the sub-image is a positive sample image or a negative sample image, it is determined whether the number of positive samples is less than the preset minimum number of samples, and whether the number of negative samples is less than the preset minimum number of negative samples. If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, it means that the number of positive sample images and negative sample images does not meet the training requirements, and you need to intercept the training images again according to step 102 Sub-image.
  • the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples and the preset number of positive and negative samples. Sample ratio, extract the positive sample image and the negative sample image, and generate a sample training set.
  • This step is similar to the method described in step 105. Every time a sub-image is captured, after judging whether the sub-image is a positive sample image or a negative sample image, it is determined whether the number of positive samples is less than the preset minimum number of samples, and whether the number of negative samples is less than Preset the minimum number of negative samples. If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, that is, when both the number of positive samples and the number of negative samples meet the training requirements, the operation of this step is executed.
  • the sample training set includes positive sample images and negative sample images, and the sample training set needs to include a sufficient number of positive sample images and negative sample images.
  • the preset total number of positive and negative samples refers to the sum of all positive and negative sample images in the sample training set
  • the preset positive and negative sample ratio refers to the ratio of the number of positive samples to the number of negative samples in the sample training set. According to the preset total number of positive and negative samples and the preset ratio of positive and negative samples, calculate the required number of positive samples and the required number of negative samples in the sample training set, and extract the positive sample image of the required number of positive samples and the negative sample image of the required number of negative samples, Generate sample training set.
  • the weight parameter of the image features where the image features include shape, color, and shadow.
  • the special shape of the palm, the color that is basically the same as that of the human face and arm, and the shadow caused by the different light source angles are important image features that affect the detection of the palm image.
  • the image to be tested refers to an image that requires palmprint recognition, and is usually an image taken immediately before palmprint recognition. According to a preset algorithm, the image features of the image to be tested are calculated. The image features include shape, color and shadow, and then the feature vector value of the image to be tested is calculated according to the weight parameter.
  • the image to be tested includes the palm image.
  • the image to be tested includes a palm image
  • the image to be tested does not include the palm image
  • a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample.
  • the embodiment of the present application provides another palm image detection method. As shown in FIG. 2, the method includes:
  • the solid mask means that when the training image is occluded, the area within the marked pixels is completely occluded, and the occluded area is the palm image.
  • Obtaining the palm image is to obtain the palm image in the marked area of the training image.
  • the specific process includes: using a solid mask to mark the palm image in the training image; obtaining the pixel coordinates of the marked pixels in the training image marked by the solid mask; generating a mask according to the pixel coordinates Matrix; Do a dot product operation on the mask matrix and the training image to generate and acquire the palm image.
  • This step is similar to the method described in step 102 shown in FIG. 1, and will not be repeated here.
  • the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image.
  • This step is similar to the method described in step 103 shown in FIG. 1, and will not be repeated here.
  • the sub-image does not completely include the palm image, determine that the sub-image is a negative sample image, and count the number of negative samples of the negative sample image.
  • step 203 is parallel to step 203, and is similar to the method described in step 104 shown in FIG. 1, and will not be repeated here.
  • the sub-images in the training image are captured again.
  • This step is similar to the method described in step 105 shown in FIG. 1, and will not be repeated here.
  • the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples and the preset number of positive and negative samples. Sample ratio, extract the positive sample image and the negative sample image, and generate a sample training set.
  • This step specifically includes: saving the positive sample image in the positive sample library, and saving the negative sample image in the negative sample library; according to the preset total number of positive and negative samples and the positive and negative sample ratio, according to the preset The rule extracts the positive sample image and the negative sample image from the positive sample library and the negative sample library respectively, and generates a sample training set.
  • the preset rules for extracting positive sample images from the positive sample library, or extracting negative sample images from the negative sample library can be extracted sequentially in the order of storage, can be extracted in the order of size from small to large, or randomly Extraction, the extraction rules for extracting positive sample images or negative sample images are not limited in the embodiment of the present application.
  • the ratio of positive and negative samples used can be 1:3.
  • the set extracts positive sample images and negative sample images from the positive sample library and the negative sample library, respectively, to generate a sample training set.
  • the process of training the sample training set is to obtain and continuously modify the weight parameters of the image features according to the known judgment result of whether the palm image is included in the sample training set, so that the Fast R-CNN model has a higher recognition accuracy.
  • This step specifically includes: in the Fast R-CNN model, input the positive sample image or the negative sample image in the training sample set; adopt the regional candidate network to calculate and generate the preset of the positive sample image or the negative sample image Suggestion window of the number of windows; map the suggestion window to the feature map convolutional layer of the Fast R-CNN model; combine the feature map convolutional layer with each of the RoI pooling layer of the Fast R-CNN model A convolution operation is performed on a rectangular ROI to generate a feature map of a fixed size; the classification probability of the feature map of a fixed size and frame regression are jointly trained to generate the weight parameter of the image feature.
  • the image to be tested refers to an image that requires palmprint recognition, and is usually an image taken immediately before palmprint recognition. According to a preset algorithm, the image features of the image to be tested are calculated. The image features include shape, color and shadow, and then the feature vector value of the image to be tested is calculated according to the weight parameter.
  • the shooting camera can be automatically restarted for shooting.
  • the palmprint feature information includes main lines, folds, minutiae points and triangle points.
  • the palm image in this step refers to the palm image included in the image to be tested.
  • the method of recognizing palmprint feature information used in this step is the same as the method of recognizing palmprint feature information entered by the user, so as to improve the recognition accuracy.
  • Recognizing the image to be tested is to identify whether the palmprint feature information is the same as the palmprint feature information saved by the recognition system. If they are the same, the image to be tested can be recognized to obtain the system authority of the response. If the image to be tested contains a palm image, but it is not recognized by the palmprint recognition system, it can also detect whether the continuously shot images to be tested are the same image. If yes, an alarm message is generated and the alarm message is sent. Send the alarm information to the administrator to notify the administrator or wait for the administrator to activate emergency measures such as the shooting and recognition functions of the image to be tested no longer in the preset time period, providing double guarantee for the safety of the palmprint recognition system .
  • a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample.
  • an embodiment of the present application provides a palm image detection device. As shown in FIG. 3, the device includes:
  • the marking module 31 is configured to use a solid mask to mark the palm image in the training image, and obtain the palm image;
  • the interception module 32 is configured to intercept the sub-images in the training image according to the image size and pixel position calculated by a random function within the image pixel range of the training image;
  • the determining module 33 is configured to determine that the sample image is a positive sample image if the sub-image includes the palm image, and count the number of positive samples of the positive sample image;
  • the determining module 33 is further configured to determine that the sample image is a negative sample image if the sub-image does not completely include the palm image, and count the number of negative samples of the negative sample image;
  • the intercepting module 32 is configured to intercept the sub-images in the training image again if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples;
  • the extraction module 34 is configured to, if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples Preset the ratio of positive and negative samples, extract the positive sample image and the negative sample image, and generate a sample training set;
  • the generating module 35 is configured to train the positive sample image and the negative sample image in the sample training set through the region-based fast convolutional neural network Fast R-CNN model, and generate the weight parameters of the image features of the training image ,
  • the image features include shape, color and shadow;
  • the calculation module 36 is configured to calculate the feature vector value of the image to be tested according to the weight parameter
  • the determining module 37 is configured to determine whether the palm image is included in the image to be tested according to the feature vector value.
  • a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample.
  • an embodiment of the present application provides another palm image detection device.
  • the device includes:
  • the marking module 41 is configured to use a solid mask to mark the palm image in the training image, and obtain the palm image;
  • the intercepting module 42 is configured to intercept the sub-images in the training image according to the image size and pixel position calculated by the random function within the image pixel range of the training image;
  • the determining module 43 is configured to determine that the sample image is a positive sample image if the sub-image includes the palm image, and count the number of positive samples of the positive sample image;
  • the determining module 43 is further configured to determine that the sample image is a negative sample image if the sub-image does not completely include the palm image, and count the number of negative samples of the negative sample image;
  • the interception module 42 is configured to intercept the sub-images in the training image again if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples;
  • the extraction module 44 is configured to, if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples Preset the ratio of positive and negative samples, extract the positive sample image and the negative sample image, and generate a sample training set;
  • the generating module 45 is configured to train the positive sample image and the negative sample image in the sample training set through the region-based fast convolutional neural network Fast R-CNN model, and generate the weight parameters of the image features of the training image ,
  • the image features include shape, color and shadow;
  • the calculation module 46 is configured to calculate the feature vector value of the image to be tested according to the weight parameter
  • the determining module 47 is configured to determine whether the palm image is included in the image to be tested according to the feature vector value.
  • the marking module 41 includes:
  • the marking unit 411 is configured to use a solid mask to mark the palm image in the training image
  • the obtaining unit 412 is configured to obtain the pixel point coordinates of the marked pixels marked by the solid mask in the training image
  • the generating unit 413 is configured to generate a mask matrix according to the pixel coordinates
  • the acquiring unit 412 is further configured to perform a dot product operation on the mask matrix and the training image to generate and acquire the palm image.
  • the extraction module 44 includes:
  • the saving unit 441 is configured to save the positive sample image in the positive sample library, and save the negative sample image in the negative sample library;
  • the extraction unit 442 is further configured to extract the positive sample image, the positive sample image, and the negative sample database from the positive sample library and the negative sample library according to preset rules according to the preset total number of positive and negative samples and the ratio of positive and negative samples
  • the negative sample image generates a sample training set.
  • the generating module 45 includes:
  • the input unit 451 is used in the Fast In the R-CNN model, input the positive sample image or the negative sample image in the training sample set;
  • the calculation unit 452 is configured to use a regional candidate network to calculate and generate suggested windows for the number of preset windows of the positive sample image or negative sample image;
  • the mapping unit 453 is configured to map the suggestion window to the Fast On the feature map convolutional layer of the R-CNN model
  • the generating unit 454 is used to combine the feature The map convolution layer and each rectangular ROI of the RoI pooling layer of the Fast R-CNN model perform convolution operations to generate a feature map of a fixed size;
  • the generating unit 454 is also used to jointly train the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature.
  • the generating unit 454 is configured to:
  • judgment module 47 is configured to:
  • the feature vector value is greater than a preset threshold, determining that the image to be tested includes the palm image
  • the feature vector value is not greater than the preset threshold, it is determined that the palm image is not included in the image to be tested.
  • the method further includes:
  • the recognition module 48 is configured to recognize palmprint feature information in the palm image if the image to be tested includes the palm image, where the palmprint feature information includes main lines, folds, minutiae points, and triangle points;
  • the recognition module 48 is also configured to recognize the image to be tested according to the palmprint feature information.
  • a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample.
  • a storage medium stores at least one executable instruction, and the computer executable instruction can execute the palm image detection method in any of the foregoing method embodiments, and the computer readable
  • the storage medium may be non-volatile or volatile.
  • FIG. 5 shows a schematic structural diagram of a computer device according to an embodiment of the present application, and the specific embodiment of the present application does not limit the specific implementation of the computer device.
  • the computer device may include a processor 502, a communications interface 504, a memory 506, and a communications bus 508.
  • the processor 502, the communication interface 504, and the memory 506 communicate with each other through the communication bus 508.
  • the communication interface 504 is used to communicate with network elements of other devices, such as clients or other servers.
  • the processor 502 is configured to execute the program 510, and specifically can execute the relevant steps in the embodiment of the palm image detection method described above.
  • the program 510 may include program code, and the program code includes computer operation instructions.
  • the processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the one or more processors included in the computer device may be the same type of processor, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs.
  • the memory 506 is used to store the program 510.
  • the memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the program 510 may be specifically used to cause the processor 502 to perform the following operations:
  • the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image;
  • the sub-image does not completely contain the palm image, determining that the sub-image is a negative sample image, and counting the number of negative samples of the negative sample image;
  • the sub-images in the training image are captured again;
  • the positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the weight parameters of the image features of the training image, the image features including Shape, color and shadow;
  • the image to be tested includes a palm image.
  • modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with program codes executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, can be executed in a different order than here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The present application relates to the technical field of image processing. Disclosed are a palm image detection method and apparatus. The method comprises: using a solid mask for marking and obtaining a palm image in a training image; intercepting sub-images in the training image; determining positive sample images and negative sample images in the sub-images, counting the number of positive samples and the number of negative samples, determining whether preset conditions are satisfied, and if yes, intercepting the sub-images in the training image again; if not, extracting the positive sample images and the negative sample images, and generating a sample training set; training the sample training set by means of a Fast R-CNN model, and generating weight parameters of the training image; calculating a feature vector value of an image to be detected according to the weight parameters; and determining whether the image to be detected comprises the palm image according to the feature vector value. By means of the approach, the accuracy of palm image recognition can be improved.

Description

一种手掌图像的检测方法及装置Method and device for detecting palm image
本申请申明享有2019年6月20日递交的申请号为201910534814.6、名称为“一种手掌图像的检测方法及装置”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application affirms that it enjoys the priority of a Chinese patent application filed on June 20, 2019 with the application number 201910534814.6 and titled "A method and device for detecting palm images". The entire content of the Chinese patent application is incorporated by reference In this application.
技术领域Technical field
本申请涉及基于神经网络的图像处理技术领域,特别是涉及一种手掌图像的检测方法及装置。This application relates to the technical field of image processing based on neural networks, in particular to a method and device for detecting palm images.
背景技术Background technique
随着信息技术的飞速发展,掌纹识别技术因其可靠性和便捷性,各种身份认证场景中得到广泛的应用。掌纹识别技术利用人手掌纹路特征进行身份鉴别,具体过程包括:先拍摄一张用户的待测手掌图片,然后提取待测手掌图片中手掌的掌纹与系统中预存的掌纹进行匹配,如果匹配成功则认为掌纹识别成功,该用户身份合法。With the rapid development of information technology, palmprint recognition technology has been widely used in various identity authentication scenarios due to its reliability and convenience. The palmprint recognition technology uses the characteristics of human palm patterns to identify the identity. The specific process includes: first take a picture of the user's palm to be tested, and then extract the palmprints of the palm of the palm to be tested and match the palmprints stored in the system. If the matching is successful, the palmprint recognition is considered successful, and the user's identity is legal.
在提取待测手掌图片中手掌掌纹过程中,通常先需要判断所拍摄的图片中是否包含有效手掌图形,再进行后续的掌纹提取操作。现有技术中,先检测图像边缘再通过SVM分类器对有效手掌图像和无效手掌图像的训练结果,判断待测手掌图片是否包含有效手掌图形,其中,SVM分类器是利用图像灰度梯度信息训练的。In the process of extracting palm prints in the palm image to be tested, it is usually necessary to first determine whether the captured image contains valid palm prints, and then perform subsequent palm print extraction operations. In the prior art, the edge of the image is detected first, and then the training results of the effective palm image and the invalid palm image by the SVM classifier are used to determine whether the palm image to be tested contains a valid palm image. The SVM classifier is trained using image gray gradient information. of.
技术问题technical problem
发明人意识到,如果待测手掌图片中包括手掌、手臂和人脸等颜色相近图像,尤其是当颜色相近图像发生重叠时,颜色相近图像所对应的灰度信息基本相同,不能通过灰度信息区分手掌、手臂和人脸,所以利用灰度梯度信息很难准确判断待测手掌图片中是否包含有效手掌图形。The inventor realizes that if the palm image to be tested includes palm, arm, and face images with similar colors, especially when images with similar colors overlap, the gray information corresponding to the images with similar colors is basically the same, and gray information cannot be passed. The palm, arm and face are distinguished, so it is difficult to accurately judge whether the palm image to be tested contains a valid palm image by using the gray gradient information.
技术解决方案Technical solutions
有鉴于此,本申请提供一种手掌图像的检测方法及装置,主要目的在于解决现有技术中的判断待测手掌图像中是否包含手掌图像的准确率低的问题。In view of this, the present application provides a palm image detection method and device, the main purpose of which is to solve the problem of low accuracy in determining whether the palm image to be tested includes a palm image in the prior art.
依据本申请一个方面,提供了一种手掌图像的检测方法,包括:采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;根据所述权重参数,计算待测图像的特征向量值;根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to one aspect of the present application, a method for detecting palm images is provided, including: using a solid mask to mark a palm image in a training image, and obtaining the palm image; within the image pixel range of the training image, according to random The image size and pixel position calculated by the function are used to intercept the sub-images in the training image; if the sub-image contains the palm image, the sub-image is determined to be a positive sample image, and statistics of the positive sample image The number of positive samples; if the sub-image does not completely contain the palm image, the sub-image is determined to be a negative sample image, and the number of negative samples of the negative sample image is counted; if the number of positive samples is less than the preset minimum The number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again; if the number of positive samples is not less than the preset minimum number of positive samples, and the If the number of negative samples is not less than the preset minimum number of negative samples, the positive sample image and the negative sample image are extracted according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples to generate a sample training set; The region-based fast convolutional neural network Fast R-CNN model trains the positive sample image and the negative sample image in the sample training set, and generates weight parameters of image features of the training image, the image features including shapes , Color and shadow; calculate the feature vector value of the image to be tested according to the weight parameter; determine whether the palm image is included in the image to be tested according to the feature vector value.
依据本申请另一个方面,提供了一种手掌图像的检测装置,包括:标记模块,用于采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;截取模块,用于在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;确定模块,用于如果所述子图像包含所述手掌图像,则确定所述样本图像为正样本图像,并统计所述正样本图像的正样本数量;所述确定模块,还用于如果所述子图像不完全包含所述手掌图像,则确定所述样本图像为负样本图像,并统计所述负样本图像的负样本数量;所述截取模块,用于如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;提取模块,用于如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;生成模块,用于通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;计算模块,用于根据所述权重参数,计算待测图像的特征向量值;判断模块,用于根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to another aspect of the present application, there is provided a palm image detection device, including: a marking module for marking the palm image in the training image with a solid mask, and obtaining the palm image; Within the image pixel range of the training image, the sub-image in the training image is intercepted according to the image size and pixel position calculated by a random function; the determining module is used to determine if the sub-image contains the palm image The sample image is a positive sample image, and the number of positive samples of the positive sample image is counted; the determining module is further configured to determine that the sample image is a negative sample if the sub-image does not completely contain the palm image Image, and count the number of negative samples of the negative sample image; the intercepting module is used for if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then Intercepting the sub-images in the training image again; an extraction module for if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, According to the preset total number of positive and negative samples and the preset ratio of positive and negative samples, the positive sample image and the negative sample image are extracted to generate a sample training set; the generation module is used to pass the region-based fast convolutional neural network Fast The R-CNN model trains the positive sample image and the negative sample image in the sample training set, and generates the weight parameters of the image features of the training image. The image features include shape, color, and shadow; the calculation module uses According to the weight parameter, the feature vector value of the image to be measured is calculated; the judgment module is used for judging whether the palm image is included in the image to be measured according to the feature vector value.
根据本申请的又一方面,提供了一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如下步骤的操作:采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;根据所述权重参数,计算待测图像的特征向量值;根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to another aspect of the present application, there is provided a storage medium in which at least one executable instruction is stored, and the executable instruction causes a processor to perform the following steps: using a solid mask to mark the training image The palm image of the training image, and obtain the palm image; within the image pixel range of the training image, according to the image size and pixel position calculated by the random function, intercept the sub-image in the training image; if the sub-image contains For the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image; if the sub-image does not completely contain the palm image, determine that the sub-image is a negative sample Image, and count the number of negative samples of the negative sample image; if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the training image is captured again If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, according to the preset total number of positive and negative samples and the preset Positive-negative sample ratio, extract the positive sample image and the negative sample image to generate a sample training set; train the positive sample image and the sample training set in the sample training set through the region-based fast convolutional neural network Fast R-CNN model The negative sample image generates the weight parameters of the image features of the training image, the image features include shape, color, and shadow; according to the weight parameters, the feature vector value of the image to be tested is calculated; according to the feature vector value To determine whether the image to be tested contains the palm image.
根据本申请的再一方面,提供了一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行以下步骤的操作:采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;根据所述权重参数,计算待测图像的特征向量值;根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to another aspect of the present application, there is provided a computer device, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete mutual communication through the communication bus. Communication; the memory is used to store at least one executable instruction, the executable instruction causes the processor to perform the following steps: use a solid mask to mark the palm image in the training image, and obtain the palm image; Within the image pixel range of the training image, the sub-image in the training image is intercepted according to the image size and pixel position calculated by a random function; if the sub-image includes the palm image, it is determined that the sub-image is Positive sample image, and count the number of positive samples of the positive sample image; if the sub-image does not completely contain the palm image, determine that the sub-image is a negative sample image, and count the negative samples of the negative sample image Number; if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again; if the number of positive samples is not less than If the preset minimum number of positive samples and the number of negative samples are not less than the preset minimum number of negative samples, the positive sample image and the preset positive and negative sample ratio are extracted according to the preset total number of positive and negative samples. The negative sample image generates a sample training set; the positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the training image The weight parameter of the image feature, the image feature includes shape, color and shadow; according to the weight parameter, the feature vector value of the image to be measured is calculated; according to the feature vector value, it is judged whether the image to be measured contains the palm image .
有益效果Beneficial effect
本申请实施例提供的技术方案通过标记训练图像中的手掌图像,获取正样本图像或负样本图像,提高训练样本的精确度,以提高根据训练样本训练得到的图像特征的权重参数的准确度。通过训练Fast R-CNN模型中形状、颜色和阴影等图像特征的权重参数,提高根据该权重参数判断待测图像中是否包含手掌图像的准确度。The technical solution provided by the embodiments of the present application obtains positive sample images or negative sample images by marking the palm images in the training images to improve the accuracy of the training samples, so as to improve the accuracy of the weight parameters of image features obtained by training based on the training samples. By training the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only used for the purpose of illustrating the preferred embodiments, and are not considered as a limitation to the application. Also, throughout the drawings, the same reference symbols are used to denote the same components. In the attached picture:
图1示出了本申请实施例提供的一种手掌图像的检测方法流程图;Fig. 1 shows a flowchart of a palm image detection method provided by an embodiment of the present application;
图2示出了本申请实施例另一种手掌图像的检测方法流程图;FIG. 2 shows a flowchart of another palm image detection method according to an embodiment of the present application;
图3示出了本申请实施例提供的一种手掌图像的检测装置组成框图;Figure 3 shows a block diagram of a palm image detection device provided by an embodiment of the present application;
图4示出了本申请实施例提供的另一种手掌图像的检测组成框图;FIG. 4 shows a block diagram of another palm image detection composition provided by an embodiment of the present application;
图5示出了本申请实施例提供的一种计算机设备的结构示意图。Fig. 5 shows a schematic structural diagram of a computer device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the invention
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited by the embodiments set forth herein.
在掌纹识别过程中,通常先需要判断所拍摄的图片中是否包含有效手掌图形,如果确定所拍摄的图像中包含有效掌纹图形,再进行后续的掌纹提取与识别操作。在实际拍摄的待测图像中,除了手掌还可能包括脸、胳膊等与手掌颜色相近似的物体图像,并且近色物体的图像还可能发生重叠,使得准确地识别并分割待测图像中的手的形状尤为困难。本申请实施例的目的是提高判断待测图像中是否包含手掌图像的判断准确率。本申请实施例提供了一种手掌图像的检测方法,如图1所示,方法包括:In the palmprint recognition process, it is usually necessary to first determine whether the captured image contains a valid palmprint pattern. If it is determined that the captured image contains a valid palmprint pattern, then perform subsequent palmprint extraction and recognition operations. In the actual image to be measured, in addition to the palm, it may also include images of objects that are similar in color to the palm, and the images of near-colored objects may also overlap, so that the hands in the image to be measured can be accurately identified and segmented. The shape is particularly difficult. The purpose of the embodiments of the present application is to improve the accuracy of determining whether a palm image is included in the image to be tested. The embodiment of the application provides a method for detecting a palm image. As shown in FIG. 1, the method includes:
101、采用实心掩膜标记训练图像中的手掌图像,并获取手掌图像。101. Use a solid mask to mark the palm image in the training image, and obtain the palm image.
训练图像是预先设置的能够全部并正确标识出图像中手掌图像的图像。手掌图像,不是特定的具有相同掌纹特征的图像,而是任意图像中的真实手掌对应的图像,在本申请实施例中是指训练图像中的手掌图像,或者待测图像中的手掌图像。在图像处理中的掩膜是指用选定的图像、图形或物体,对训练图像进行遮挡,以便于控制图像处理的区域或处理过程。实心掩膜是指在遮挡训练图像时,标记像素点内的区域被全部遮挡,其遮挡区域为手掌图像。The training image is a preset image that can fully and correctly identify the palm image in the image. The palm image is not a specific image with the same palmprint features, but an image corresponding to a real palm in any image. In the embodiment of the present application, it refers to the palm image in the training image or the palm image in the image to be tested. Masking in image processing refers to the use of selected images, graphics or objects to block the training image in order to control the area or process of image processing. The solid mask means that when the training image is occluded, the area within the marked pixels is completely occluded, and the occluded area is the palm image.
使用现有图像处理工具,标记训练图像中的手掌图像,将手掌图像掩膜与训练图像相乘,得到训练图像中的手掌图像,手掌图像内的像素值保持不变,而手掌图像外图像值都是0。也就是用手掌图像的掩膜对手掌图像之外的区域进行屏蔽。示例性的说明从训练图像中提取手掌图像的方法,也就是将训练图像中的每个像素和手掌图像掩膜的每个对应像素进行点乘运算,比如训练图像的像素矩阵为[23,22,89;0,0,255;90,0,23],手掌图像掩膜为[0,0,1;1,0,1;1,1,1],进行点乘积之后得到手掌图像的像素矩阵为[0,0,89;0,0,255;90,0,23]。Use existing image processing tools to mark the palm image in the training image, and multiply the palm image mask with the training image to obtain the palm image in the training image. The pixel value in the palm image remains unchanged, while the image value outside the palm image Both are 0. That is, the mask of the palm image masks the area outside the palm image. An exemplary description of the method of extracting a palm image from a training image is to perform a dot multiplication operation on each pixel in the training image and each corresponding pixel of the palm image mask. For example, the pixel matrix of the training image is [23,22 ,89;0,0,255;90,0,23], the palm image mask is [0,0,1;1,0,1;1,1,1], the pixel matrix of the palm image obtained after the dot product is [0,0,89;0,0,255;90,0,23].
102、在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像。102. Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function.
子图像是训练图像中的一部分,在本申请实施例中对子图像的大小不做限定。利用随机函数在训练图像的图像像素范围内,计算第一随机值,第一随机值为子图像的图像大小,子图像的形状为矩形形状,第一随机值包括子图像的宽度值和高度值。利用随机函数在训练图像的图像像素范围内,计算第二随机值,第二随机值为子图像的像素点位置。再以像素点位置为起始点,以图像大小为选定区域,截取训练图像中的子图像。在截取图像时,首先设定起始点为选定区域的哪个顶点,选定区域的顶点可以为左上角、左下角、右上角或右下角,再根据确定设定的顶点位置和选定区域大小,截取训练图像中的子图像。The sub-image is a part of the training image, and the size of the sub-image is not limited in the embodiment of the present application. Use a random function to calculate the first random value within the image pixel range of the training image, the first random value is the image size of the sub-image, the shape of the sub-image is rectangular, and the first random value includes the width and height of the sub-image . A random function is used to calculate a second random value within the image pixel range of the training image, and the second random value is the pixel position of the sub-image. Then take the pixel position as the starting point and the image size as the selected area to intercept the sub-images in the training image. When capturing an image, first set the starting point of which vertex of the selected area, the vertex of the selected area can be the upper left corner, the lower left corner, the upper right corner or the lower right corner, and then determine the set vertex position and the size of the selected area , To intercept the sub-images in the training image.
103、如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量。103. If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image.
比较子图像与手掌图像,判断子图像中是否包含手掌图像,如果手掌图像的完全包含在子图像中,则确定该子图像为正样本图像。在判断子图像中是否包含手掌图像过程中,可以先获取训练图像中手掌图像的标记位置,然后根据子图像在训练图像中的定点和选定区域大小,计算子图像在训练图像中的图像边界,根据图像边界判断标记位置是否全部落入子图像的位置范围中,如果判断结果为是,则确定子图像为正样本图像。如果该子图像是正样本图像,则与正样本图像对应的正样本数量的数值加1。The sub-image is compared with the palm image to determine whether the sub-image contains the palm image. If the palm image is completely contained in the sub-image, the sub-image is determined to be a positive sample image. In the process of judging whether the sub-image contains the palm image, you can first obtain the mark position of the palm image in the training image, and then calculate the image boundary of the sub-image in the training image according to the fixed point and selected area size of the sub-image in the training image , According to the image boundary, it is judged whether the label positions all fall within the position range of the sub-image. If the judgment result is yes, the sub-image is determined to be a positive sample image. If the sub-image is a positive sample image, the value of the number of positive samples corresponding to the positive sample image is increased by one.
104、如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量。104. If the sub-image does not completely include the palm image, determine that the sub-image is a negative sample image, and count the number of negative samples of the negative sample image.
本步骤与步骤103是并列,且与步骤103类似,其判断子图像是否包含手掌图像的过程是一样的,如果子图像中不完全包含手掌图像,也就是训练图像中手掌图像的标记位置未全部落入到子图像对应的图像边界内,则确定该子图像为负样本图像。如果该子图像是负样本图像,则与负样本图像对应的负样本数量的数值加1。This step is parallel to step 103 and is similar to step 103. The process of judging whether the sub-image contains the palm image is the same. If the sub-image does not completely contain the palm image, that is, the marked position of the palm image in the training image is not all If it falls within the image boundary corresponding to the sub-image, it is determined that the sub-image is a negative sample image. If the sub-image is a negative sample image, the value of the number of negative samples corresponding to the negative sample image is increased by one.
105、如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像。105. If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again.
每截取一次子图像,再判断子图像是正样本图像还是负样本图像之后,就判断一次正样本数量是否小于预置最小样本数量,和负样本数量是否小于预置最小负样本数量。如果正样本数量小于预置最小正样本数量,或负样本数量小于预置最小负样本数量,说明正样本图像和负样本图像的数量不满足训练要求,还需要按照步骤102再次截取训练图像中的子图像。Every time a sub-image is taken, after determining whether the sub-image is a positive sample image or a negative sample image, it is determined whether the number of positive samples is less than the preset minimum number of samples, and whether the number of negative samples is less than the preset minimum number of negative samples. If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, it means that the number of positive sample images and negative sample images does not meet the training requirements, and you need to intercept the training images again according to step 102 Sub-image.
106、如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集。106. If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples and the preset number of positive and negative samples. Sample ratio, extract the positive sample image and the negative sample image, and generate a sample training set.
本步骤与步骤105所述的方法类似,每截取一次子图像,再判断子图像是正样本图像还是负样本图像之后,就判断一次正样本数量是否小于预置最小样本数量,和负样本数量是否小于预置最小负样本数量。如果正样本数量不小于预置最小正样本数量,且负样本数量不小于预置最小负样本数量,也就是正样本数量和负样本数量同时满足训练要求时,才执行本步骤的操作。样本训练集中包括正样本图像和负样本图像,样本训练集中需要包括足够数量的正样本图像和负样本图像。预置正负样本总数量,是指样本训练集中所有正负样本图像的数量和,预置正负样本比率是指样本训练集中正样本数量和负样本数量的数量比。根据预置正负样本总数量和预置正负样本比率,计算样本训练集中的正样本需求数量和负样本需求数量,提取正样本需求数量的正样本图像和负样本需求数量的负样本图像,生成样本训练集。This step is similar to the method described in step 105. Every time a sub-image is captured, after judging whether the sub-image is a positive sample image or a negative sample image, it is determined whether the number of positive samples is less than the preset minimum number of samples, and whether the number of negative samples is less than Preset the minimum number of negative samples. If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, that is, when both the number of positive samples and the number of negative samples meet the training requirements, the operation of this step is executed. The sample training set includes positive sample images and negative sample images, and the sample training set needs to include a sufficient number of positive sample images and negative sample images. The preset total number of positive and negative samples refers to the sum of all positive and negative sample images in the sample training set, and the preset positive and negative sample ratio refers to the ratio of the number of positive samples to the number of negative samples in the sample training set. According to the preset total number of positive and negative samples and the preset ratio of positive and negative samples, calculate the required number of positive samples and the required number of negative samples in the sample training set, and extract the positive sample image of the required number of positive samples and the negative sample image of the required number of negative samples, Generate sample training set.
107、通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数。107. Train the positive sample image and the negative sample image in the sample training set by using a region-based fast convolutional neural network Fast R-CNN model to generate weight parameters of image features of the training image.
在基于区域的快速卷积神经网络Fast R-CNN模型中输入样本训练集中的正样本图像和负样本图像,以检测正样本图像和负样本图像中的手掌图像为目的,不断调整并生成训练图像的图像特征的权重参数,其中图像特征包括形状、颜色和阴影。手掌的特殊形状,并且与人脸和胳膊基本相同的颜色,以及光源照射角度不同产生的阴影,是影响检测手掌图像的重要图像特征。通过训练已知是否存在手掌图像的正样本图像和负样本图像,通过不断的调整图像特征对应的权重参数,以使得Fast R-CNN模型具有较高地识别准确度。Input the positive sample images and negative sample images in the sample training set into the region-based fast convolutional neural network Fast R-CNN model, and continuously adjust and generate training images for the purpose of detecting the palm images in the positive sample images and negative sample images The weight parameter of the image features, where the image features include shape, color, and shadow. The special shape of the palm, the color that is basically the same as that of the human face and arm, and the shadow caused by the different light source angles are important image features that affect the detection of the palm image. By training positive sample images and negative sample images that are known to be palm images, and constantly adjusting the weight parameters corresponding to the image features, the Fast R-CNN model has a higher recognition accuracy.
108、根据所述权重参数,计算待测图像的特征向量值。108. Calculate the feature vector value of the image to be tested according to the weight parameter.
待测图像,是指需要进行掌纹识别的图像,通常为识别掌纹之前即时拍摄的图像。根据预置算法,计算待测图像的图像特征,图像特征包括形状、颜色和阴影,再根据权重参数计算待测图像的特征向量值。The image to be tested refers to an image that requires palmprint recognition, and is usually an image taken immediately before palmprint recognition. According to a preset algorithm, the image features of the image to be tested are calculated. The image features include shape, color and shadow, and then the feature vector value of the image to be tested is calculated according to the weight parameter.
109、根据所述特征向量值,判断待测图像中是否包含所述手掌图像。109. According to the feature vector value, determine whether the image to be tested includes the palm image.
当特征向量值大于预置阈值时,待测图中包含手掌图像,当特征向量值不大于预置阈值时,待测图像中不包含手掌图像。When the feature vector value is greater than the preset threshold, the image to be tested includes a palm image, and when the feature vector value is not greater than the preset threshold, the image to be tested does not include the palm image.
判断待测图像中是否包含手掌图像,然后根据判断结果执行下一操作,如果判断结果为是则识别待测图像中的手掌图像是否为已录入的手掌图像,如果判断结果为否则需要重新拍摄待测图像。当然如果判断结果为否,还可提示未检测到手掌。Determine whether the image to be tested contains a palm image, and then perform the next operation according to the result of the judgment. If the result of the judgment is yes, identify whether the palm image in the image to be tested is a palm image that has been recorded. Measure the image. Of course, if the judgment result is no, it can also prompt that no palm is detected.
本申请实施例通过标记训练图像中的手掌图像,获取正样本图像或负样本图像,提高训练样本的精确度,以提高根据训练样本训练得到的图像特征的权重参数的准确度。通过训练Fast R-CNN模型中形状、颜色和阴影等图像特征的权重参数,提高根据该权重参数判断待测图像中是否包含手掌图像的准确度。In the embodiment of the present application, a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample. By training the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
本申请实施例提供了另一种手掌图像的检测方法,如图2所示,方法包括:The embodiment of the present application provides another palm image detection method. As shown in FIG. 2, the method includes:
201、采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像。201. Use a solid mask to mark a palm image in a training image, and obtain the palm image.
实心掩膜是指在遮挡训练图像时,标记像素点内的区域被全部遮挡,其遮挡区域为手掌图像。获取手掌图像也就是获取训练图像的标记区域内的手掌图像。具体过程包括:采用实心掩膜标记所述训练图像中的手掌图像;获取所述训练图像中被所述实心掩膜标记的标记像素点的像素点坐标;根据所述像素点坐标,生成掩膜矩阵;将所述掩膜矩阵与所述训练图像做点乘运算,生成并获取所述手掌图像。The solid mask means that when the training image is occluded, the area within the marked pixels is completely occluded, and the occluded area is the palm image. Obtaining the palm image is to obtain the palm image in the marked area of the training image. The specific process includes: using a solid mask to mark the palm image in the training image; obtaining the pixel coordinates of the marked pixels in the training image marked by the solid mask; generating a mask according to the pixel coordinates Matrix; Do a dot product operation on the mask matrix and the training image to generate and acquire the palm image.
202、在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像。202. Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function.
本步骤与图1所示的步骤102所述的方法类似,这里不再赘述。This step is similar to the method described in step 102 shown in FIG. 1, and will not be repeated here.
203、如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量。203. If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image.
本步骤与图1所示的步骤103所述的方法类似,这里不再赘述。This step is similar to the method described in step 103 shown in FIG. 1, and will not be repeated here.
204、如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量。204. If the sub-image does not completely include the palm image, determine that the sub-image is a negative sample image, and count the number of negative samples of the negative sample image.
本步骤与步骤203是并列,与图1所示的步骤104所述的方法类似,这里不再赘述。This step is parallel to step 203, and is similar to the method described in step 104 shown in FIG. 1, and will not be repeated here.
205、如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像。205. If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again.
本步骤与图1所示的步骤105所述的方法类似,这里不再赘述。This step is similar to the method described in step 105 shown in FIG. 1, and will not be repeated here.
206、如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集。206. If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples and the preset number of positive and negative samples. Sample ratio, extract the positive sample image and the negative sample image, and generate a sample training set.
每截取一次子图像,再判断子图像是正样本图像还是负样本图像之后,就判断一次正样本数量是否小于预置最小样本数量,和负样本数量是否小于预置最小负样本数量。本步骤具体包括:在正样本库中保存所述正样本图像,在负样本库中保存所述负样本图像;根据所述预置正负样本总数量和所述正负样本比率,按照预置规则从所述正样本库、所述负样本库中分别提取所述正样本图像、所述负样本图像,生成样本训练集。Every time a sub-image is taken, after determining whether the sub-image is a positive sample image or a negative sample image, it is determined whether the number of positive samples is less than the preset minimum number of samples, and whether the number of negative samples is less than the preset minimum number of negative samples. This step specifically includes: saving the positive sample image in the positive sample library, and saving the negative sample image in the negative sample library; according to the preset total number of positive and negative samples and the positive and negative sample ratio, according to the preset The rule extracts the positive sample image and the negative sample image from the positive sample library and the negative sample library respectively, and generates a sample training set.
从正样本库中提取正样本图像,或者从负样本库中提取负样本图像所依据的预置规则,可以是按照存储顺序顺次提取,可以按照图片大小从小到大的顺序提取,还可以随机提取,在本申请实施例中对提取正样本图像或负样本图像的提取规则不做限定。在提取过程中,采用的正负样本比率可以为1:3。集合从正样本库、负样本库中分别提取正样本图像、负样本图像,生成样本训练集。The preset rules for extracting positive sample images from the positive sample library, or extracting negative sample images from the negative sample library, can be extracted sequentially in the order of storage, can be extracted in the order of size from small to large, or randomly Extraction, the extraction rules for extracting positive sample images or negative sample images are not limited in the embodiment of the present application. In the extraction process, the ratio of positive and negative samples used can be 1:3. The set extracts positive sample images and negative sample images from the positive sample library and the negative sample library, respectively, to generate a sample training set.
207、通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数。207. Train the positive sample image and the negative sample image in the sample training set by using a region-based fast convolutional neural network Fast R-CNN model to generate weight parameters of image features of the training image.
训练样本训练集的过程,也就是根据样本训练集中已知的是否包含手掌图像的判断结果,得出并不断修正图像特征的权重参数,以使得Fast R-CNN模型具有较高地识别准确度。The process of training the sample training set is to obtain and continuously modify the weight parameters of the image features according to the known judgment result of whether the palm image is included in the sample training set, so that the Fast R-CNN model has a higher recognition accuracy.
本步骤具体包括:在所述Fast R-CNN模型中,输入所述训练样本集中的正样本图像或负样本图像;采用区域候选网络,计算并生成所述正样本图像或负样本图像的预置窗口数量的建议窗口;将所述建议窗口映射到所述Fast R-CNN模型的feature map卷积层上;将所述feature map卷积层与所述Fast R-CNN模型的RoI pooling层的每个矩形框ROI做卷积运算,生成固定尺寸的feature map;联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数。This step specifically includes: in the Fast R-CNN model, input the positive sample image or the negative sample image in the training sample set; adopt the regional candidate network to calculate and generate the preset of the positive sample image or the negative sample image Suggestion window of the number of windows; map the suggestion window to the feature map convolutional layer of the Fast R-CNN model; combine the feature map convolutional layer with each of the RoI pooling layer of the Fast R-CNN model A convolution operation is performed on a rectangular ROI to generate a feature map of a fixed size; the classification probability of the feature map of a fixed size and frame regression are jointly trained to generate the weight parameter of the image feature.
其中,在联合训练时:利用探测分类概率Softmax Loss和探测边框回归Smooth L1 Loss,分别对分类概率和边框回归联合训练所述固定尺寸的feature map,生成所述图像特征的权重参数。Among them, during joint training: use the detection classification probability Softmax Loss and the detection frame regression Smooth L1 Loss to jointly train the fixed size feature for the classification probability and the frame regression respectively map, generating the weight parameter of the image feature.
208、根据所述权重参数,计算待测图像的特征向量值。208. Calculate the feature vector value of the image to be tested according to the weight parameter.
待测图像,是指需要进行掌纹识别的图像,通常为识别掌纹之前即时拍摄的图像。根据预置算法,计算待测图像的图像特征,图像特征包括形状、颜色和阴影,再根据权重参数计算待测图像的特征向量值。The image to be tested refers to an image that requires palmprint recognition, and is usually an image taken immediately before palmprint recognition. According to a preset algorithm, the image features of the image to be tested are calculated. The image features include shape, color and shadow, and then the feature vector value of the image to be tested is calculated according to the weight parameter.
209、根据所述特征向量值,判断待测图像中是否包含所述手掌图像。209. According to the feature vector value, determine whether the image to be tested includes the palm image.
具体包括:如果所述特征向量值大于预置阈值,则确定所述待测图像中包含所述手掌图像;如果所述特征向量值不大于所述预置阈值,则确定所述待测图像中不包含所述手掌图像。如果判断结果为否则需要重新拍摄待测图像。当然如果判断结果为否,还可自动重启拍摄摄像头进行拍摄。Specifically: if the feature vector value is greater than a preset threshold, determining that the image to be tested contains the palm image; if the feature vector value is not greater than the preset threshold, then determining that the image to be tested is The palm image is not included. If the judgment result is otherwise, the image to be tested needs to be retaken. Of course, if the judgment result is no, the shooting camera can be automatically restarted for shooting.
210、如果所述待测图像中包含所述手掌图像,则识别所述手掌图像中的掌纹特征信息。210. If the palm image is included in the image to be tested, identify palmprint feature information in the palm image.
由于手掌图像中包含的信息量多,为了提高掌纹识别速度,首先需要识别手掌图像中的掌纹特征信息,其中掌纹特征信息包括主线、褶皱、细节点和三角点。在本步骤中的手掌图像是指待测图像中包含的手掌图像。本步骤中采用的识别掌纹特征信息的方法,与识别用户录入掌纹的掌纹特征信息的方法相同,以便于提高识别准确率。Due to the large amount of information contained in the palm image, in order to improve the speed of palmprint recognition, it is first necessary to identify the palmprint feature information in the palm image. The palmprint feature information includes main lines, folds, minutiae points and triangle points. The palm image in this step refers to the palm image included in the image to be tested. The method of recognizing palmprint feature information used in this step is the same as the method of recognizing palmprint feature information entered by the user, so as to improve the recognition accuracy.
211、根据所述掌纹特征信息,识别所述待测图像。211. Identify the image to be tested according to the palmprint feature information.
识别待测图像也就是识别掌纹特征信息是否与识别系统已保存的掌纹特征信息相同,如果相同则该待测图像通过识别,能够获取响应的系统权限。如果待测图像中包含手掌图像,但未通过掌纹识别系统的识别,还可以检测连续拍摄的待测图像是否为同一图像,如果为是则产生告警信息,并发送告警信息。将告警信息发送至管理员,以通知管理员或者等待管理员启动在预置时间段内不再启动待测图像的拍摄与识别功能等应急处理办法,为掌纹识别系统的安全性提供双重保障。Recognizing the image to be tested is to identify whether the palmprint feature information is the same as the palmprint feature information saved by the recognition system. If they are the same, the image to be tested can be recognized to obtain the system authority of the response. If the image to be tested contains a palm image, but it is not recognized by the palmprint recognition system, it can also detect whether the continuously shot images to be tested are the same image. If yes, an alarm message is generated and the alarm message is sent. Send the alarm information to the administrator to notify the administrator or wait for the administrator to activate emergency measures such as the shooting and recognition functions of the image to be tested no longer in the preset time period, providing double guarantee for the safety of the palmprint recognition system .
本申请实施例通过标记训练图像中的手掌图像,获取正样本图像或负样本图像,提高训练样本的精确度,以提高根据训练样本训练得到的图像特征的权重参数的准确度。通过训练Fast R-CNN模型中形状、颜色和阴影等图像特征的权重参数,提高根据该权重参数判断待测图像中是否包含手掌图像的准确度。In the embodiment of the present application, a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample. By training the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
进一步的,作为对上述图1所示方法的实现,本申请实施例提供了一种手掌图像的检测装置,如图3所示,该装置包括: Further, as an implementation of the method shown in FIG. 1, an embodiment of the present application provides a palm image detection device. As shown in FIG. 3, the device includes:
标记模块31,用于采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;The marking module 31 is configured to use a solid mask to mark the palm image in the training image, and obtain the palm image;
截取模块32,用于在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;The interception module 32 is configured to intercept the sub-images in the training image according to the image size and pixel position calculated by a random function within the image pixel range of the training image;
确定模块33,用于如果所述子图像包含所述手掌图像,则确定所述样本图像为正样本图像,并统计所述正样本图像的正样本数量;The determining module 33 is configured to determine that the sample image is a positive sample image if the sub-image includes the palm image, and count the number of positive samples of the positive sample image;
所述确定模块33,还用于如果所述子图像不完全包含所述手掌图像,则确定所述样本图像为负样本图像,并统计所述负样本图像的负样本数量;The determining module 33 is further configured to determine that the sample image is a negative sample image if the sub-image does not completely include the palm image, and count the number of negative samples of the negative sample image;
所述截取模块32,用于如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;The intercepting module 32 is configured to intercept the sub-images in the training image again if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples;
提取模块34,用于如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;The extraction module 34 is configured to, if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples Preset the ratio of positive and negative samples, extract the positive sample image and the negative sample image, and generate a sample training set;
生成模块35,用于通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;The generating module 35 is configured to train the positive sample image and the negative sample image in the sample training set through the region-based fast convolutional neural network Fast R-CNN model, and generate the weight parameters of the image features of the training image , The image features include shape, color and shadow;
计算模块36,用于根据所述权重参数,计算待测图像的特征向量值;The calculation module 36 is configured to calculate the feature vector value of the image to be tested according to the weight parameter;
判断模块37,用于根据所述特征向量值,判断待测图像中是否包含所述手掌图像。The determining module 37 is configured to determine whether the palm image is included in the image to be tested according to the feature vector value.
本申请实施例通过标记训练图像中的手掌图像,获取正样本图像或负样本图像,提高训练样本的精确度,以提高根据训练样本训练得到的图像特征的权重参数的准确度。通过训练Fast R-CNN模型中形状、颜色和阴影等图像特征的权重参数,提高根据该权重参数判断待测图像中是否包含手掌图像的准确度。In the embodiment of the present application, a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample. By training the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
进一步的,作为对上述图2所示方法的实现,本申请实施例提供了另一种手掌图像的检测装置,如图4所示,该装置包括:Further, as an implementation of the method shown in FIG. 2, an embodiment of the present application provides another palm image detection device. As shown in FIG. 4, the device includes:
标记模块41,用于采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;The marking module 41 is configured to use a solid mask to mark the palm image in the training image, and obtain the palm image;
截取模块42,用于在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;The intercepting module 42 is configured to intercept the sub-images in the training image according to the image size and pixel position calculated by the random function within the image pixel range of the training image;
确定模块43,用于如果所述子图像包含所述手掌图像,则确定所述样本图像为正样本图像,并统计所述正样本图像的正样本数量;The determining module 43 is configured to determine that the sample image is a positive sample image if the sub-image includes the palm image, and count the number of positive samples of the positive sample image;
所述确定模块43,还用于如果所述子图像不完全包含所述手掌图像,则确定所述样本图像为负样本图像,并统计所述负样本图像的负样本数量;The determining module 43 is further configured to determine that the sample image is a negative sample image if the sub-image does not completely include the palm image, and count the number of negative samples of the negative sample image;
所述截取模块42,用于如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;The interception module 42 is configured to intercept the sub-images in the training image again if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples;
提取模块44,用于如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;The extraction module 44 is configured to, if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples Preset the ratio of positive and negative samples, extract the positive sample image and the negative sample image, and generate a sample training set;
生成模块45,用于通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;The generating module 45 is configured to train the positive sample image and the negative sample image in the sample training set through the region-based fast convolutional neural network Fast R-CNN model, and generate the weight parameters of the image features of the training image , The image features include shape, color and shadow;
计算模块46,用于根据所述权重参数,计算待测图像的特征向量值;The calculation module 46 is configured to calculate the feature vector value of the image to be tested according to the weight parameter;
判断模块47,用于根据所述特征向量值,判断待测图像中是否包含所述手掌图像。The determining module 47 is configured to determine whether the palm image is included in the image to be tested according to the feature vector value.
进一步的,所述标记模块41,包括:Further, the marking module 41 includes:
标记单元411,用于采用实心掩膜标记所述训练图像中的手掌图像;The marking unit 411 is configured to use a solid mask to mark the palm image in the training image;
获取单元412,用于获取所述训练图像中被所述实心掩膜标记的标记像素点的像素点坐标;The obtaining unit 412 is configured to obtain the pixel point coordinates of the marked pixels marked by the solid mask in the training image;
生成单元413,用于根据所述像素点坐标,生成掩膜矩阵;The generating unit 413 is configured to generate a mask matrix according to the pixel coordinates;
所述获取单元412,还用于将掩膜矩阵与所述训练图像做点乘运算,生成并获取所述手掌图像。The acquiring unit 412 is further configured to perform a dot product operation on the mask matrix and the training image to generate and acquire the palm image.
进一步的,所述提取模块44,包括:Further, the extraction module 44 includes:
保存单元441,用于在正样本库中保存所述正样本图像,在负样本库中保存所述负样本图像;The saving unit 441 is configured to save the positive sample image in the positive sample library, and save the negative sample image in the negative sample library;
提取单元442,还用于根据所述预置正负样本总数量和所述正负样本比率,按照预置规则从所述正样本库、所述负样本库中分别提取所述正样本图像、所述负样本图像,生成样本训练集。The extraction unit 442 is further configured to extract the positive sample image, the positive sample image, and the negative sample database from the positive sample library and the negative sample library according to preset rules according to the preset total number of positive and negative samples and the ratio of positive and negative samples The negative sample image generates a sample training set.
进一步的,所述生成模块45,包括:Further, the generating module 45 includes:
输入单元451,用于在所述Fast R-CNN模型中,输入所述训练样本集中的正样本图像或负样本图像;The input unit 451 is used in the Fast In the R-CNN model, input the positive sample image or the negative sample image in the training sample set;
计算单元452,用于采用区域候选网络,计算并生成所述正样本图像或负样本图像的预置窗口数量的建议窗口;The calculation unit 452 is configured to use a regional candidate network to calculate and generate suggested windows for the number of preset windows of the positive sample image or negative sample image;
映射单元453,用于将所述建议窗口映射到所述Fast R-CNN模型的feature map卷积层上;The mapping unit 453 is configured to map the suggestion window to the Fast On the feature map convolutional layer of the R-CNN model;
生成单元454,用于将所述feature map卷积层与所述Fast R-CNN模型的RoI pooling层的每个矩形框ROI做卷积运算,生成固定尺寸的feature map;The generating unit 454 is used to combine the feature The map convolution layer and each rectangular ROI of the RoI pooling layer of the Fast R-CNN model perform convolution operations to generate a feature map of a fixed size;
所述生成单元454,还用于联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数。The generating unit 454 is also used to jointly train the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature.
进一步的,所述生成单元454,用于:Further, the generating unit 454 is configured to:
利用探测分类概率Softmax Loss和探测边框回归Smooth L1 Loss,分别对分类概率和边框回归联合训练所述固定尺寸的feature map,生成所述图像特征的权重参数。Use the detection classification probability Softmax Loss and the detection frame regression Smooth L1 Loss to jointly train the fixed size feature for the classification probability and the frame regression respectively map, generating the weight parameter of the image feature.
进一步的,所述判断模块47,用于:Further, the judgment module 47 is configured to:
如果所述特征向量值大于预置阈值,则确定所述待测图像中包含所述手掌图像;If the feature vector value is greater than a preset threshold, determining that the image to be tested includes the palm image;
如果所述特征向量值不大于所述预置阈值,则确定所述待测图像中不包含所述手掌图像。If the feature vector value is not greater than the preset threshold, it is determined that the palm image is not included in the image to be tested.
进一步的,所述方法还包括:Further, the method further includes:
识别模块48,用于如果所述待测图像中包含所述手掌图像,则识别所述手掌图像中的掌纹特征信息,所述掌纹特征信息包括主线、褶皱、细节点和三角点;The recognition module 48 is configured to recognize palmprint feature information in the palm image if the image to be tested includes the palm image, where the palmprint feature information includes main lines, folds, minutiae points, and triangle points;
所述识别模块48,还用于根据所述掌纹特征信息,识别所述待测图像。The recognition module 48 is also configured to recognize the image to be tested according to the palmprint feature information.
本申请实施例通过标记训练图像中的手掌图像,获取正样本图像或负样本图像,提高训练样本的精确度,以提高根据训练样本训练得到的图像特征的权重参数的准确度。通过训练Fast R-CNN模型中形状、颜色和阴影等图像特征的权重参数,提高根据该权重参数判断待测图像中是否包含手掌图像的准确度。In the embodiment of the present application, a positive sample image or a negative sample image is obtained by marking the palm image in the training image to improve the accuracy of the training sample, so as to improve the accuracy of the weight parameter of the image feature obtained by training based on the training sample. By training the weight parameters of image features such as shape, color, and shadow in the Fast R-CNN model, the accuracy of judging whether the image to be tested contains palm images according to the weight parameters is improved.
根据本申请一个实施例提供了一种存储介质,所述存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的手掌图像的检测方法,所述计算机可读存储介质可以是非易失性,也可以是易失性。According to an embodiment of the present application, a storage medium is provided, the storage medium stores at least one executable instruction, and the computer executable instruction can execute the palm image detection method in any of the foregoing method embodiments, and the computer readable The storage medium may be non-volatile or volatile.
图5示出了根据本申请一个实施例提供的一种计算机设备的结构示意图,本申请具体实施例并不对计算机设备的具体实现做限定。FIG. 5 shows a schematic structural diagram of a computer device according to an embodiment of the present application, and the specific embodiment of the present application does not limit the specific implementation of the computer device.
如图5所示,该计算机设备可以包括:处理器(processor)502、通信接口(Communications Interface)504、存储器(memory)506、以及通信总线508。As shown in FIG. 5, the computer device may include a processor 502, a communications interface 504, a memory 506, and a communications bus 508.
其中:处理器502、通信接口504、以及存储器506通过通信总线508完成相互间的通信。Wherein: the processor 502, the communication interface 504, and the memory 506 communicate with each other through the communication bus 508.
通信接口504,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 504 is used to communicate with network elements of other devices, such as clients or other servers.
处理器502,用于执行程序510,具体可以执行上述手掌图像的检测方法实施例中的相关步骤。The processor 502 is configured to execute the program 510, and specifically can execute the relevant steps in the embodiment of the palm image detection method described above.
具体地,程序510可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 510 may include program code, and the program code includes computer operation instructions.
处理器502可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。计算机设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computer device may be the same type of processor, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs.
存储器506,用于存放程序510。存储器506可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
程序510具体可以用于使得处理器502执行以下操作:The program 510 may be specifically used to cause the processor 502 to perform the following operations:
采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;Use a solid mask to mark the palm image in the training image, and obtain the palm image;
在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function;
如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image;
如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;If the sub-image does not completely contain the palm image, determining that the sub-image is a negative sample image, and counting the number of negative samples of the negative sample image;
如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again;
如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples , Extracting the positive sample image and the negative sample image to generate a sample training set;
通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;The positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the weight parameters of the image features of the training image, the image features including Shape, color and shadow;
根据所述权重参数,计算待测图像的特征向量值;Calculating the feature vector value of the image to be tested according to the weight parameter;
根据所述特征向量值,判断待测图像中是否包含手掌图像。According to the feature vector value, it is determined whether the image to be tested includes a palm image.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, alternatively, they can be implemented with program codes executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, can be executed in a different order than here. Perform the steps shown or described, or fabricate them into individual integrated circuit modules, or fabricate multiple modules or steps of them into a single integrated circuit module to achieve. In this way, this application is not limited to any specific hardware and software combination.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。The above descriptions are only preferred embodiments of the application, and are not used to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims (20)

  1. 一种手掌图像的检测方法,其中,包括: A method for detecting palm images, including:
    采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;Use a solid mask to mark the palm image in the training image, and obtain the palm image;
    在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function;
    如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image;
    如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;If the sub-image does not completely contain the palm image, determining that the sub-image is a negative sample image, and counting the number of negative samples of the negative sample image;
    如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again;
    如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples , Extracting the positive sample image and the negative sample image to generate a sample training set;
    通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;The positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the weight parameters of the image features of the training image, the image features including Shape, color and shadow;
    根据所述权重参数,计算待测图像的特征向量值;Calculating the feature vector value of the image to be tested according to the weight parameter;
    根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to the feature vector value, it is determined whether the image to be tested includes the palm image.
  2. 如权利要求1所述的方法,其中,所述采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像,包括: The method according to claim 1, wherein said using a solid mask to mark the palm image in the training image and obtaining the palm image comprises:
    采用实心掩膜标记所述训练图像中的手掌图像;Using a solid mask to mark the palm image in the training image;
    获取所述训练图像中被所述实心掩膜标记的标记像素点的像素点坐标;Acquiring the pixel point coordinates of the marked pixels marked by the solid mask in the training image;
    根据所述像素点坐标,生成掩膜矩阵;Generate a mask matrix according to the pixel coordinates;
    将所述掩膜矩阵与所述训练图像做点乘运算,生成并获取所述手掌图像。Do a dot product operation on the mask matrix and the training image to generate and obtain the palm image.
  3. 如权利要求1所述的方法,其中,所述按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集,包括: The method according to claim 1, wherein the extracting the positive sample image and the negative sample image according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples to generate a sample training set comprises:
    在正样本库中保存所述正样本图像,在负样本库中保存所述负样本图像;Save the positive sample image in a positive sample library, and save the negative sample image in a negative sample library;
    根据所述预置正负样本总数量和所述正负样本比率,按照预置规则从所述正样本库、所述负样本库中分别提取所述正样本图像、所述负样本图像,生成样本训练集。According to the preset total number of positive and negative samples and the ratio of positive and negative samples, the positive sample image and the negative sample image are respectively extracted from the positive sample library and the negative sample library according to preset rules to generate Sample training set.
  4. 如权利要求1所述的方法,其中,所述通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,包括: The method according to claim 1, wherein the training of the positive sample image and the negative sample image in the sample training set is performed by the region-based fast convolutional neural network Fast R-CNN model to generate the training image The weight parameters of image features include:
    在所述Fast R-CNN模型中,输入所述训练样本集中的正样本图像或负样本图像;In the Fast R-CNN model, input a positive sample image or a negative sample image in the training sample set;
    采用区域候选网络,计算并生成所述正样本图像或负样本图像的预置窗口数量的建议窗口;Using the regional candidate network to calculate and generate suggested windows for the number of preset windows for the positive sample image or the negative sample image;
    将所述建议窗口映射到所述Fast R-CNN模型的feature map卷积层上;Mapping the suggestion window to the feature map convolutional layer of the Fast R-CNN model;
    将所述feature map卷积层与所述Fast R-CNN模型的RoI pooling层的每个矩形框ROI做卷积运算,生成固定尺寸的feature map;Performing a convolution operation on the feature map convolution layer and each rectangular ROI of the RoI pooling layer of the Fast R-CNN model to generate a feature map of a fixed size;
    联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数。Joint training of the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature.
  5. 如权利要求4所述的方法,其中,所述利联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数,包括: The method according to claim 4, wherein the joint training of the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature comprises:
    利用探测分类概率Softmax Loss和探测边框回归Smooth L1 Loss,分别对分类概率和边框回归联合训练所述固定尺寸的feature map,生成所述图像特征的权重参数。Use the detection classification probability Softmax Loss and the detection frame regression Smooth L1 Loss to jointly train the fixed size feature for the classification probability and the frame regression respectively map, generating the weight parameter of the image feature.
  6. 如权利要求1所述的方法,其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像,包括: The method according to claim 1, wherein the judging whether the image to be tested contains the palm image according to the feature vector value comprises:
    如果所述特征向量值大于预置阈值,则确定所述待测图像中包含所述手掌图像;If the feature vector value is greater than a preset threshold, determining that the image to be tested includes the palm image;
    如果所述特征向量值不大于所述预置阈值,则确定所述待测图像中不包含所述手掌图像。If the feature vector value is not greater than the preset threshold, it is determined that the palm image is not included in the image to be tested.
  7. 如权利要求6所述的方法,其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像之后,所述方法还包括:7. The method according to claim 6, wherein after said determining whether the image to be tested contains the palm image according to the feature vector value, the method further comprises:
    如果所述待测图像中包含所述手掌图像,则识别所述手掌图像中的掌纹特征信息,所述掌纹特征信息包括主线、褶皱、细节点和三角点;If the image to be tested includes the palm image, identifying palmprint feature information in the palm image, where the palmprint feature information includes main lines, folds, minutiae points, and triangle points;
    根据所述掌纹特征信息,识别所述待测图像。Identify the image to be tested according to the palmprint feature information.
  8. 一种手掌图像的检测装置,其中,包括:A palm image detection device, which includes:
    标记模块,用于采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;The marking module is used to mark the palm image in the training image with a solid mask and obtain the palm image;
    截取模块,用于在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;The interception module is used to intercept the sub-images in the training image according to the image size and pixel position calculated by the random function within the image pixel range of the training image;
    确定模块,用于如果所述子图像包含所述手掌图像,则确定所述样本图像为正样本图像,并统计所述正样本图像的正样本数量;A determining module, configured to determine that the sample image is a positive sample image if the sub-image includes the palm image, and count the number of positive samples of the positive sample image;
    所述确定模块,还用于如果所述子图像不完全包含所述手掌图像,则确定所述样本图像为负样本图像,并统计所述负样本图像的负样本数量;The determining module is further configured to determine that the sample image is a negative sample image if the sub-image does not completely include the palm image, and count the number of negative samples of the negative sample image;
    所述截取模块,用于如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;The intercepting module is configured to intercept the sub-image in the training image again if the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples;
    提取模块,用于如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;The extraction module is configured to, if the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, follow the preset total number of positive and negative samples and the preset Set the ratio of positive and negative samples, extract the positive sample image and the negative sample image, and generate a sample training set;
    生成模块,用于通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;Generation module, used to pass region-based fast convolutional neural network Fast The R-CNN model trains the positive sample image and the negative sample image in the sample training set, and generates weight parameters of image features of the training image, the image features including shape, color, and shadow;
    计算模块,用于根据所述权重参数,计算待测图像的特征向量值;The calculation module is used to calculate the feature vector value of the image to be tested according to the weight parameter;
    判断模块,用于根据所述特征向量值,判断待测图像中是否包含手掌图像。The judging module is used to judge whether the image to be tested contains a palm image according to the feature vector value.
  9. 一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行以下步骤的操作:A storage medium storing at least one executable instruction, and the executable instruction causes a processor to perform the operations of the following steps:
    采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;Use a solid mask to mark the palm image in the training image, and obtain the palm image;
    在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function;
    如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image;
    如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;If the sub-image does not completely contain the palm image, determining that the sub-image is a negative sample image, and counting the number of negative samples of the negative sample image;
    如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again;
    如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples , Extracting the positive sample image and the negative sample image to generate a sample training set;
    通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;Through the region-based fast convolutional neural network Fast The R-CNN model trains the positive sample image and the negative sample image in the sample training set, and generates weight parameters of image features of the training image, the image features including shape, color, and shadow;
    根据所述权重参数,计算待测图像的特征向量值;Calculating the feature vector value of the image to be tested according to the weight parameter;
    根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to the feature vector value, it is determined whether the image to be tested includes the palm image.
  10. 如权利要求9所述的存储介质,其中,所述采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像,包括:9. The storage medium of claim 9, wherein the step of using a solid mask to mark the palm image in the training image and obtaining the palm image comprises:
    采用实心掩膜标记所述训练图像中的手掌图像;Using a solid mask to mark the palm image in the training image;
    获取所述训练图像中被所述实心掩膜标记的标记像素点的像素点坐标;Acquiring the pixel point coordinates of the marked pixels marked by the solid mask in the training image;
    根据所述像素点坐标,生成掩膜矩阵;Generate a mask matrix according to the pixel coordinates;
    将所述掩膜矩阵与所述训练图像做点乘运算,生成并获取所述手掌图像。Do a dot product operation on the mask matrix and the training image to generate and obtain the palm image.
  11. 如权利要求9所述的存储介质,其中,所述按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集,包括: 9. The storage medium of claim 9, wherein the extracting the positive sample image and the negative sample image according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples to generate a sample training set comprises:
    在正样本库中保存所述正样本图像,在负样本库中保存所述负样本图像;Save the positive sample image in a positive sample library, and save the negative sample image in a negative sample library;
    根据所述预置正负样本总数量和所述正负样本比率,按照预置规则从所述正样本库、所述负样本库中分别提取所述正样本图像、所述负样本图像,生成样本训练集。According to the preset total number of positive and negative samples and the ratio of positive and negative samples, the positive sample image and the negative sample image are respectively extracted from the positive sample library and the negative sample library according to preset rules to generate Sample training set.
  12. 如权利要求9所述的存储介质,其中,所述通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,包括: The storage medium according to claim 9, wherein the training of the positive sample image and the negative sample image in the sample training set is performed by the region-based fast convolutional neural network Fast R-CNN model to generate the training The weight parameters of the image features of the image include:
    在所述Fast R-CNN模型中,输入所述训练样本集中的正样本图像或负样本图像;In the Fast R-CNN model, input a positive sample image or a negative sample image in the training sample set;
    采用区域候选网络,计算并生成所述正样本图像或负样本图像的预置窗口数量的建议窗口;Using the regional candidate network to calculate and generate suggested windows for the number of preset windows for the positive sample image or the negative sample image;
    将所述建议窗口映射到所述Fast R-CNN模型的feature map卷积层上;Mapping the suggestion window to the feature map convolutional layer of the Fast R-CNN model;
    将所述feature map卷积层与所述Fast R-CNN模型的RoI pooling层的每个矩形框ROI做卷积运算,生成固定尺寸的feature map;Performing a convolution operation on the feature map convolution layer and each rectangular ROI of the RoI pooling layer of the Fast R-CNN model to generate a feature map of a fixed size;
    联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数。Joint training of the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature.
  13. 如权利要求9所述的存储介质,其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像,包括:9. The storage medium according to claim 9, wherein the determining whether the image to be tested contains the palm image according to the feature vector value comprises:
    如果所述特征向量值大于预置阈值,则确定所述待测图像中包含所述手掌图像;If the feature vector value is greater than a preset threshold, determining that the image to be tested includes the palm image;
    如果所述特征向量值不大于所述预置阈值,则确定所述待测图像中不包含所述手掌图像。If the feature vector value is not greater than the preset threshold, it is determined that the palm image is not included in the image to be tested.
  14. 如权利要求13所述的存储介质,其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像之后,所述方法还包括:15. The storage medium according to claim 13, wherein, after said determining whether the image to be tested includes the palm image according to the feature vector value, the method further comprises:
    如果所述待测图像中包含所述手掌图像,则识别所述手掌图像中的掌纹特征信息,所述掌纹特征信息包括主线、褶皱、细节点和三角点;If the image to be tested includes the palm image, identifying palmprint feature information in the palm image, where the palmprint feature information includes main lines, folds, minutiae points, and triangle points;
    根据所述掌纹特征信息,识别所述待测图像。Identify the image to be tested according to the palmprint feature information.
  15. 一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信; A computer device includes: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface communicate with each other through the communication bus;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行以下步骤的操作:The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations of the following steps:
    采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像;Use a solid mask to mark the palm image in the training image, and obtain the palm image;
    在所述训练图像的图像像素范围内,根据随机函数计算的图像大小和像素点位置,截取所述训练图像中的子图像;Within the image pixel range of the training image, intercept sub-images in the training image according to the image size and pixel position calculated by a random function;
    如果所述子图像包含所述手掌图像,则确定所述子图像为正样本图像,并统计所述正样本图像的正样本数量;If the sub-image includes the palm image, determine that the sub-image is a positive sample image, and count the number of positive samples of the positive sample image;
    如果所述子图像不完全包含所述手掌图像,则确定所述子图像为负样本图像,并统计所述负样本图像的负样本数量;If the sub-image does not completely contain the palm image, determining that the sub-image is a negative sample image, and counting the number of negative samples of the negative sample image;
    如果所述正样本数量小于预置最小正样本数量,或所述负样本数量小于预置最小负样本数量,则再次截取所述训练图像中的子图像;If the number of positive samples is less than the preset minimum number of positive samples, or the number of negative samples is less than the preset minimum number of negative samples, then the sub-images in the training image are captured again;
    如果所述正样本数量不小于所述预置最小正样本数量,且所述负样本数量不小于所述预置最小负样本数量,则按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集;If the number of positive samples is not less than the preset minimum number of positive samples, and the number of negative samples is not less than the preset minimum number of negative samples, according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples , Extracting the positive sample image and the negative sample image to generate a sample training set;
    通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中的所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,所述图像特征包括形状、颜色和阴影;Through the region-based fast convolutional neural network Fast The R-CNN model trains the positive sample image and the negative sample image in the sample training set, and generates weight parameters of image features of the training image, the image features including shape, color, and shadow;
    根据所述权重参数,计算待测图像的特征向量值;Calculating the feature vector value of the image to be tested according to the weight parameter;
    根据所述特征向量值,判断待测图像中是否包含所述手掌图像。According to the feature vector value, it is determined whether the image to be tested includes the palm image.
  16. 如权利要求15所述的计算机设备其中,所述采用实心掩膜标记训练图像中的手掌图像,并获取所述手掌图像,包括:15. The computer device according to claim 15, wherein said using a solid mask to mark a palm image in a training image and obtaining said palm image comprises:
    采用实心掩膜标记所述训练图像中的手掌图像;Using a solid mask to mark the palm image in the training image;
    获取所述训练图像中被所述实心掩膜标记的标记像素点的像素点坐标;Acquiring the pixel point coordinates of the marked pixels marked by the solid mask in the training image;
    根据所述像素点坐标,生成掩膜矩阵;Generate a mask matrix according to the pixel coordinates;
    将所述掩膜矩阵与所述训练图像做点乘运算,生成并获取所述手掌图像。Do a dot product operation on the mask matrix and the training image to generate and obtain the palm image.
  17. 如权利要求15所述的计算机设备其中,所述按照预置正负样本总数量和预置正负样本比率,提取所述正样本图像和所述负样本图像,生成样本训练集,包括: 15. The computer device according to claim 15, wherein said extracting said positive sample image and said negative sample image according to the preset total number of positive and negative samples and the preset ratio of positive and negative samples to generate a sample training set comprises:
    在正样本库中保存所述正样本图像,在负样本库中保存所述负样本图像;Save the positive sample image in a positive sample library, and save the negative sample image in a negative sample library;
    根据所述预置正负样本总数量和所述正负样本比率,按照预置规则从所述正样本库、所述负样本库中分别提取所述正样本图像、所述负样本图像,生成样本训练集。According to the preset total number of positive and negative samples and the ratio of positive and negative samples, the positive sample image and the negative sample image are respectively extracted from the positive sample library and the negative sample library according to preset rules to generate Sample training set.
  18. 如权利要求15所述的计算机设备其中,所述通过基于区域的快速卷积神经网络Fast R-CNN模型训练所述样本训练集中所述正样本图像和所述负样本图像,生成所述训练图像的图像特征的权重参数,包括: The computer device according to claim 15, wherein the positive sample image and the negative sample image in the sample training set are trained by the region-based fast convolutional neural network Fast R-CNN model to generate the training image The weight parameters of image features include:
    在所述Fast R-CNN模型中,输入所述训练样本集中的正样本图像或负样本图像;In the Fast R-CNN model, input a positive sample image or a negative sample image in the training sample set;
    采用区域候选网络,计算并生成所述正样本图像或负样本图像的预置窗口数量的建议窗口;Using the regional candidate network to calculate and generate suggested windows for the number of preset windows for the positive sample image or the negative sample image;
    将所述建议窗口映射到所述Fast R-CNN模型的feature map卷积层上;Mapping the suggestion window to the feature map convolutional layer of the Fast R-CNN model;
    将所述feature map卷积层与所述Fast R-CNN模型的RoI pooling层的每个矩形框ROI做卷积运算,生成固定尺寸的feature map;Performing a convolution operation on the feature map convolution layer and each rectangular ROI of the RoI pooling layer of the Fast R-CNN model to generate a feature map of a fixed size;
    联合训练所述固定尺寸的feature map的分类概率和边框回归,生成所述图像特征的权重参数。Joint training of the classification probability and border regression of the fixed-size feature map to generate the weight parameter of the image feature.
  19. 如权利要求15所述的计算机设备其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像,包括:The computer device according to claim 15, wherein the determining whether the image to be tested contains the palm image according to the feature vector value comprises:
    如果所述特征向量值大于预置阈值,则确定所述待测图像中包含所述手掌图像;If the feature vector value is greater than a preset threshold, determining that the image to be tested includes the palm image;
    如果所述特征向量值不大于所述预置阈值,则确定所述待测图像中不包含所述手掌图像。If the feature vector value is not greater than the preset threshold, it is determined that the palm image is not included in the image to be tested.
  20. 如权利要求19所述的计算机设备其中,所述根据所述特征向量值,判断待测图像中是否包含所述手掌图像之后,所述方法还包括: The computer device according to claim 19, wherein after said determining whether the image to be tested contains the palm image according to the feature vector value, the method further comprises:
    如果所述待测图像中包含所述手掌图像,则识别所述手掌图像中的掌纹特征信息,所述掌纹特征信息包括主线、褶皱、细节点和三角点;If the image to be tested includes the palm image, identifying palmprint feature information in the palm image, where the palmprint feature information includes main lines, folds, minutiae points, and triangle points;
    根据所述掌纹特征信息,识别所述待测图像。Identify the image to be tested according to the palmprint feature information.
PCT/CN2020/093510 2019-06-20 2020-05-29 Palm image detection method and apparatus WO2020253505A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910534814.6 2019-06-20
CN201910534814.6A CN110414330B (en) 2019-06-20 2019-06-20 Palm image detection method and device

Publications (1)

Publication Number Publication Date
WO2020253505A1 true WO2020253505A1 (en) 2020-12-24

Family

ID=68359432

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093510 WO2020253505A1 (en) 2019-06-20 2020-05-29 Palm image detection method and apparatus

Country Status (2)

Country Link
CN (1) CN110414330B (en)
WO (1) WO2020253505A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177469A (en) * 2021-04-27 2021-07-27 北京百度网讯科技有限公司 Training method and device for human body attribute detection model, electronic equipment and medium
CN115618283A (en) * 2022-12-02 2023-01-17 中国汽车技术研究中心有限公司 Cross-site script attack detection method, device, equipment and storage medium
CN116310656A (en) * 2023-05-11 2023-06-23 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN117078507A (en) * 2023-08-18 2023-11-17 上海凌立健康管理股份有限公司 AI technology-based virtual digital person dynamic tracing supervision method and system
CN117671341A (en) * 2023-11-28 2024-03-08 广州市玄武无线科技股份有限公司 Commodity identification modeling method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414330B (en) * 2019-06-20 2023-05-26 平安科技(深圳)有限公司 Palm image detection method and device
CN111428858A (en) * 2020-03-04 2020-07-17 东软睿驰汽车技术(沈阳)有限公司 Method and device for determining number of samples, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127108A (en) * 2016-06-14 2016-11-16 中国科学院软件研究所 A kind of staff image region detection method based on convolutional neural networks
CN108427942A (en) * 2018-04-22 2018-08-21 广州麦仑信息科技有限公司 A kind of palm detection based on deep learning and crucial independent positioning method
CN109345553A (en) * 2018-08-31 2019-02-15 厦门中控智慧信息技术有限公司 A kind of palm and its critical point detection method, apparatus and terminal device
CN110414330A (en) * 2019-06-20 2019-11-05 平安科技(深圳)有限公司 A kind of detection method and device of palm image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787419A (en) * 2014-12-23 2016-07-20 阿里巴巴集团控股有限公司 Palm detection method and palm detection system for palm image
CN107145898B (en) * 2017-04-14 2020-04-10 北京航星机器制造有限公司 Radiographic image classification method based on neural network
CN107066995A (en) * 2017-05-25 2017-08-18 中国矿业大学 A kind of remote sensing images Bridges Detection based on convolutional neural networks
CN108509839A (en) * 2018-02-02 2018-09-07 东华大学 One kind being based on the efficient gestures detection recognition methods of region convolutional neural networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127108A (en) * 2016-06-14 2016-11-16 中国科学院软件研究所 A kind of staff image region detection method based on convolutional neural networks
CN108427942A (en) * 2018-04-22 2018-08-21 广州麦仑信息科技有限公司 A kind of palm detection based on deep learning and crucial independent positioning method
CN109345553A (en) * 2018-08-31 2019-02-15 厦门中控智慧信息技术有限公司 A kind of palm and its critical point detection method, apparatus and terminal device
CN110414330A (en) * 2019-06-20 2019-11-05 平安科技(深圳)有限公司 A kind of detection method and device of palm image

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177469A (en) * 2021-04-27 2021-07-27 北京百度网讯科技有限公司 Training method and device for human body attribute detection model, electronic equipment and medium
CN113177469B (en) * 2021-04-27 2024-04-12 北京百度网讯科技有限公司 Training method and device of human attribute detection model, electronic equipment and medium
CN115618283A (en) * 2022-12-02 2023-01-17 中国汽车技术研究中心有限公司 Cross-site script attack detection method, device, equipment and storage medium
CN116310656A (en) * 2023-05-11 2023-06-23 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN116310656B (en) * 2023-05-11 2023-08-15 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment
CN117078507A (en) * 2023-08-18 2023-11-17 上海凌立健康管理股份有限公司 AI technology-based virtual digital person dynamic tracing supervision method and system
CN117078507B (en) * 2023-08-18 2024-05-14 上海凌立健康管理股份有限公司 AI technology-based virtual digital person dynamic tracing supervision method and system
CN117671341A (en) * 2023-11-28 2024-03-08 广州市玄武无线科技股份有限公司 Commodity identification modeling method and device

Also Published As

Publication number Publication date
CN110414330B (en) 2023-05-26
CN110414330A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
WO2020253505A1 (en) Palm image detection method and apparatus
WO2020253062A1 (en) Method and apparatus for detecting image border
TWI713366B (en) Method and device for target sampling of images
US10977523B2 (en) Methods and apparatuses for identifying object category, and electronic devices
CN110232311B (en) Method and device for segmenting hand image and computer equipment
US10635890B2 (en) Facial recognition method and apparatus, electronic device, and storage medium
CN111401257B (en) Face recognition method based on cosine loss under non-constraint condition
CN105512638B (en) A kind of Face datection and alignment schemes based on fusion feature
CN107506693B (en) Distort face image correcting method, device, computer equipment and storage medium
WO2019192121A1 (en) Dual-channel neural network model training and human face comparison method, and terminal and medium
JP2020074174A (en) System and method for performing fingerprint-based user authentication using images captured with mobile device
CN103035013B (en) A kind of precise motion shadow detection method based on multi-feature fusion
Chugh et al. Fingerprint spoof detection using minutiae-based local patches
US7657086B2 (en) Method and apparatus for automatic eyeglasses detection using a nose ridge mask
CN108509988B (en) Test paper score automatic statistical method and device, electronic equipment and storage medium
US20240013572A1 (en) Method for face detection, terminal device and non-transitory computer-readable storage medium
CN112016563B (en) Method for identifying authenticity of circular seal
JP2022133378A (en) Face biological detection method, device, electronic apparatus, and storage medium
US10395090B2 (en) Symbol detection for desired image reconstruction
CN110443184A (en) ID card information extracting method, device and computer storage medium
CN112560584A (en) Face detection method and device, storage medium and terminal
CN110288040B (en) Image similarity judging method and device based on topology verification
CN111950554A (en) Identification card identification method, device, equipment and storage medium
CN111652205A (en) Text correction method, device, equipment and medium based on deep learning
CN107369086A (en) A kind of identity card stamp system and method

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: 20826377

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20826377

Country of ref document: EP

Kind code of ref document: A1