WO2019095587A1 - Face recognition method, application server, and computer-readable storage medium - Google Patents

Face recognition method, application server, and computer-readable storage medium Download PDF

Info

Publication number
WO2019095587A1
WO2019095587A1 PCT/CN2018/077640 CN2018077640W WO2019095587A1 WO 2019095587 A1 WO2019095587 A1 WO 2019095587A1 CN 2018077640 W CN2018077640 W CN 2018077640W WO 2019095587 A1 WO2019095587 A1 WO 2019095587A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
classified
sample
classifier
recognized
Prior art date
Application number
PCT/CN2018/077640
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 WO2019095587A1 publication Critical patent/WO2019095587A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching
    • 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/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • the present application relates to the field of face recognition technologies, and in particular, to a face recognition method, an application server, and a computer readable storage medium.
  • identity recognition technology is becoming more and more mature, including face recognition technology.
  • face recognition technology when the face recognition algorithm determines that the error acceptance rate and the error rejection rate are different due to the threshold setting, the following may occur:
  • the threshold is set too high, the probability of false positives is reduced, that is, the acceptance rate of the error is lowered, and at the same time, the phenomenon that the recognition object is rejected by the person may be rejected, that is, the rejection rate of the error may also increase;
  • the threshold setting is low, the probability of false positives is increased, that is, the acceptance rate of the error is increased, and the rejection rate of the error is simultaneously decreased.
  • the present application proposes a face recognition method, an application server, and a computer readable storage medium to reduce an erroneous acceptance rate and an erroneous rejection rate.
  • the present application provides a face recognition method, the method comprising the steps of:
  • the matching value of the to-be-identified face and each sample to be classified is smaller than the corresponding preset value, input the face to be recognized into a classifier connected in parallel, wherein the parallel
  • the classifier connected in the manner includes samples to be classified;
  • the sample to be classified having the smallest total weight value is selected as the recognized face to output the sample to be classified.
  • the present application further provides an application server, including a memory and a processor, where the memory stores a face recognition system operable on the processor, where the face recognition system is The steps of the face recognition method as described above are implemented when the processor is executed.
  • the present application further provides a computer readable storage medium storing a face recognition system, the face recognition system being executable by at least one processor to The at least one processor performs the steps of the face recognition method as described above.
  • the face recognition method, the application server and the computer readable storage medium proposed by the present application can reduce the error acceptance rate and the wrong rejection rate to improve the accuracy of face recognition.
  • 1 is a schematic diagram of an optional hardware architecture of an application server of the present application
  • FIG. 2 is a schematic diagram of program modules of the first, second, and third embodiments of the present applicant's face recognition system
  • FIG. 3 is a schematic diagram of a program module of a fourth embodiment of the present applicant's face recognition system
  • FIG. 4 is a schematic flow chart of the first embodiment of the present applicant's face recognition method
  • FIG. 5 is a schematic flow chart of a second embodiment of the present applicant's face recognition method
  • FIG. 6 is a schematic flow chart of a third embodiment of the present applicant's face recognition method.
  • FIG. 1 it is a schematic diagram of an optional hardware architecture of the application server 2 of the present application.
  • the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the application server 2 may be an independent server or a server cluster composed of multiple servers. .
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2.
  • the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc.
  • the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device.
  • the memory 11 is generally used to store an operating system installed in the application server 2 and various types of application software, such as program codes of the face recognition system 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the application server 2.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running the face recognition system 200 or the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices.
  • a face recognition system 200 Referring to Fig. 2, it is a program block diagram of the first, second and third embodiments of the applicant's face recognition system 200.
  • the face recognition system 200 includes a series of computer program instructions stored in the memory 11, and when the computer program instructions are executed by the processor 12, the face recognition operation of the embodiments of the present application can be implemented. .
  • the face recognition system 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 2, the face recognition system 200 can be divided into an acquisition module 201, a calculation module 202, a determination module 203, an input module 204, a selection module 205, an assignment module 206, a selection module 207, a cutting module 208, and Normalized module 209. among them:
  • the obtaining module 201 is configured to obtain information about a face to be recognized.
  • the obtaining module 201 acquires face information of the user to identify the user.
  • the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
  • the calculating module 202 is configured to separately calculate matching values of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
  • the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching.
  • the calculating module 202 respectively calculates matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier.
  • the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
  • the determining module 203 is configured to determine whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value.
  • the determining module 203 determines the matching value. Whether it is less than the corresponding preset value.
  • the input module 204 is configured to: when the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, The face to be recognized is input to a classifier connected in parallel.
  • the classifiers connected in parallel include samples to be classified.
  • the determining module 203 determines that the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value
  • the determining The module 203 determines that the face to be recognized is not successfully identified in the first classifier and the second classifier.
  • the input module 204 inputs the face to be recognized to a classifier connected in parallel.
  • the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time.
  • the classifier connected in parallel includes at least the first classifier and the second classifier.
  • the selecting module 205 is configured to arrange the samples to be classified according to the similarity with the face to be recognized, and select a preset number of samples to be classified with high similarity with the face to be recognized.
  • the selecting module 205 separately compares the sample to be classified in the to-be-classifier with the to-be-identified according to the calculated similarity between the to-be-identified face and the sample to be classified in the classifier. Face similarity is arranged in descending order.
  • the selection module 205 selects the sample A to be classified and the sample B to be classified in the first classifier, and selects the sample A to be classified and the sample B to be classified in the second classifier.
  • the value-adding module 206 is configured to assign different weight values to the samples to be classified according to the similarity between the to-be-identified face and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
  • the evaluation module 206 assigns different weight values to the selected first two to-be-classified samples according to the similarity between the to-be-identified face and the sample to be classified, and calculates the first two samples to be classified.
  • the total weight value obtained For example, after the selection module 205 selects the sample A to be classified and the sample B to be classified, the evaluation module 206 assigns different weight values to the classified sample A and the sample to be classified, respectively, wherein the first classifier has an assignment module. 206 assigns a weight value of 1 to the sample A to be classified, and a weight value of 2 to the sample B to be classified, and the weighting value of the sample A to be classified in the second classifier is 2, and the weight value of the sample B to be classified is given. 2, at this time, the sample A to be classified obtains a total weight value of 3, and the sample B to be classified obtains a total weight value of 4.
  • the selecting module 207 is configured to select a sample to be classified with the smallest total weight value as the recognized human face to output the sample to be classified.
  • the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified is 2, and the weight value obtained by the sample A to be classified in the second classifier 2, the sample B to be classified obtains a weight value of 2, the total weight value obtained by the sample A to be classified is 3, and the sample B to be classified obtains a total weight value of 4, and the selection module 207 selects the sample A to be classified as
  • the recognized face is output and the sample A to be classified is output.
  • the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the smaller the total weight value obtained by the sample to be classified, the higher the similarity with the face to be recognized.
  • the classifier refers to when the input data contains a plurality of samples, and each sample includes a plurality of attributes, and one of the special attributes is referred to as a class (for example, high, medium, and low degrees of similarity).
  • the purpose of the classifier is to analyze the input data and build a model and use this model to classify the input data.
  • the above classifier includes: a support vector machine classifier, an artificial neural network classifier, a fuzzy classifier, a Bayesian classifier, a template matching classifier, a geometric classifier, and the like can be used.
  • the calculation module 202 is further configured to calculate a first matching value between the to-be-identified face and the sample to be classified in the first classifier.
  • the calculation module 202 calculates a first matching value of the to-be-identified face and the sample to be classified in the first classifier according to the face histogram.
  • the determining module 203 is further configured to determine whether the first matching value is greater than a first preset value.
  • the selecting module 207 is further configured to: when the first matching value is greater than the first preset value, select a sample to be classified in the first classifier as the recognized human face.
  • the selecting module 207 selects the to-be-selected The classification sample is the recognized face.
  • the determining module 203 determines that the first matching value is smaller than the first preset value, then:
  • the calculation module 202 is further configured to calculate a second matching value of the to-be-identified face and the sample to be classified in the second classifier.
  • the calculating module 202 calculates a second matching value of the to-be-identified face and the sample to be classified in the second classifier according to the face histogram.
  • the determining module 203 is further configured to determine whether the second matching value is greater than a second preset value.
  • the selecting module 207 is further configured to: when the second matching value is greater than the second preset value, select a sample to be classified in the second classifier as the recognized human face.
  • the face recognition system 200 includes the acquisition module 201, the calculation module 202, the determination module 203, the input module 204, the selection module 205, the assignment module 206, and the selection module 207 in the first embodiment.
  • a cutting module 208 and a normalization module 209 are also included.
  • the cutting module 208 is configured to calibrate and cut the face to be recognized.
  • the cutting module 208 performs calibration cutting on the face to be recognized to obtain and identify feature information of the face to be recognized.
  • the normalization module 209 is further configured to normalize the cut face to be recognized by the histogram to obtain a face histogram.
  • the normalization module 209 performs histogram normalization on the face to be recognized to obtain a histogram of the face, by straightening the face The graph is compared with the sample to be classified, and the matching value between the face to be recognized and the sample to be classified is calculated.
  • the present application also proposes a face recognition method.
  • FIG. 4 it is a schematic flowchart of the first embodiment of the present applicant's face recognition method.
  • the order of execution of the steps in the flowchart shown in FIG. 4 may be changed according to different requirements, and some steps may be omitted.
  • Step S400 acquiring information of a face to be recognized.
  • the face information of the user is acquired to identify the user.
  • the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
  • Step S402 respectively calculating a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
  • the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching. And matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier, respectively.
  • the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
  • Step S404 determining whether the matching value of the to-be-identified face and each sample to be classified is smaller than a corresponding preset value.
  • the matching values of the to-be-identified face and the samples to be classified in the first classifier and the second classifier are respectively calculated, it is determined whether the matching values are all smaller than the corresponding preset values.
  • Step S406 when the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, the face to be recognized is input.
  • the classifiers connected in parallel include samples to be classified.
  • the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value
  • determining the person to be identified The face is not recognized successfully in both the first classifier and the second classifier.
  • the face to be recognized is input to a classifier connected in parallel.
  • the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time.
  • the classifier connected in parallel includes at least the first classifier and the second classifier.
  • Step S408 Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized.
  • the similarity between the sample to be classified and the face to be recognized in the classifier is High to low order.
  • the first N samples to be classified with high similarity to the face to be recognized are selected from the samples to be classified that are arranged.
  • N 2.
  • the sample A to be classified and the sample B to be classified in the first classifier are selected, and the sample A to be classified and the sample B to be classified in the second classifier are selected.
  • Step S410 assign different weight values to the samples to be classified according to the similarity between the to-be-identified face and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
  • different weight values are respectively assigned to the first two samples to be classified according to the similarity between the face to be identified and the sample to be classified, and the total weights obtained by the first two samples to be classified are calculated.
  • the sample to be classified A and the sample to be classified B are respectively given different weight values, wherein the weight value of the sample A to be classified in the first classifier is given 1
  • the weight value of the sample B to be classified in the first classifier is 2, and the weight value of the sample A to be classified in the second classifier is 2, and the weight value of the sample B to be classified in the second classifier is 2, and the time is
  • the classification sample A obtains a total weight value of 3
  • the sample to be classified B obtains a total weight value of 4.
  • Step S412 selecting a sample to be classified with the smallest total weight value as the recognized face to output the sample to be classified.
  • the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified is 2, and the weight value obtained by the sample A to be classified in the second classifier 2, the sample B to be classified obtains a weight value of 2, the sample A to be classified obtains a total weight value of 3, and the sample B to be classified obtains a total weight value of 4, and the sample A to be classified is selected as the recognized face and The sample A to be classified is output.
  • the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the higher the similarity of the face, the fewer the number of votes obtained.
  • the classifier refers to when the input data contains a plurality of samples, and each sample includes a plurality of attributes, and one of the special attributes is referred to as a class (for example, high, medium, and low degrees of similarity).
  • the purpose of the classifier is to analyze the input data and build a model and use this model to classify the input data.
  • the above classifier includes: a support vector machine classifier, an artificial neural network classifier, a fuzzy classifier, a Bayesian classifier, a template matching classifier, a geometric classifier, and the like can be used.
  • FIG. 5 it is a schematic flowchart of the second embodiment of the present applicant's face recognition method.
  • the steps S500, S506-S516 of the face recognition method are similar to the steps S400-S412 of the first embodiment, except that the method further includes steps S502-S504.
  • the method includes the following steps:
  • Step S500 obtaining information of a face to be recognized.
  • the face information of the user is acquired to identify the user.
  • the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
  • Step S502 calibrating and cutting the face to be recognized.
  • the face to be recognized is subjected to calibration cutting to obtain and identify feature information of the face to be recognized.
  • Step S504 the histogram normalizes the cut face to be recognized to obtain a face histogram, so as to calculate a matching value between the face to be recognized and the sample to be classified through a face histogram.
  • a histogram normalization is performed on the face to be recognized to obtain a face histogram, so that the face to be recognized is calculated by the face histogram and the face The matching value of the sample to be classified.
  • Step S506 respectively calculating a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
  • the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching. And matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier, respectively.
  • the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
  • Step S508 determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value.
  • the matching values of the to-be-identified face and the samples to be classified in the first classifier and the second classifier are respectively calculated, it is determined whether the matching values are all smaller than the corresponding preset values.
  • Step S510 when the matching value of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, input the face to be recognized To classifiers connected in parallel.
  • the classifiers connected in parallel include samples to be classified.
  • the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value
  • determining the person to be identified The face is not recognized successfully in both the first classifier and the second classifier.
  • the face to be recognized is input to a classifier connected in parallel.
  • the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time.
  • the classifier connected in parallel includes at least the first classifier and the second classifier.
  • Step S512 the samples to be classified are arranged according to the similarity with the face to be recognized, and a predetermined number of samples to be classified with high similarity with the face to be recognized are selected.
  • the similarity between the sample to be classified and the face to be recognized in the classifier is High to low order.
  • the first N samples to be classified with high similarity to the face to be recognized are selected from the samples to be classified that are arranged.
  • N 2.
  • the sample A to be classified and the sample B to be classified in the first classifier are selected, and the sample A to be classified and the sample B to be classified in the second classifier are selected.
  • Step S514 assign different weight values to the samples to be classified according to the similarity between the face to be identified and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
  • the first two to-be-classified samples are assigned different weight values according to the similarity between the to-be-identified face and the sample to be classified, and the total weights obtained by the first two samples to be classified are calculated. .
  • the weight values corresponding to the sample A to be classified and the sample B to be classified are respectively assigned, wherein the weight value of the sample A to be classified in the first classifier is assigned to 1,
  • the weight value of the sample B to be classified in the first classifier is 2
  • the weight value of the sample A to be classified in the second classifier is 2
  • the weight value of the sample B to be classified in the second classifier is 2, and the time is
  • the classification sample A obtains a total weight value of 3
  • the sample to be classified B obtains a total weight value of 4.
  • Step S516 selecting a sample to be classified with the smallest total weight value as the recognized human face to output the sample to be classified.
  • the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified in the first classifier is 2, and the sample to be classified in the second classifier A obtains a weight value of 2, a weight value obtained by the sample B to be classified in the second classifier is 2, a total weight value obtained by the sample A to be classified is 3, and a total weight value of 4 to be classified is selected.
  • the sample A to be classified is taken as the recognized face and the sample A to be classified is output.
  • the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the higher the similarity of the face, the fewer the number of votes obtained.
  • FIG. 6 is a schematic flowchart diagram of a third embodiment of the present applicant's face recognition method.
  • step S506 of the second embodiment further includes the following steps:
  • Step S600 Calculate a first matching value between the to-be-identified face and the sample to be classified in the first classifier.
  • the first matching value of the to-be-identified face and the sample to be classified in the first classifier is calculated according to the face histogram.
  • step S602 it is determined whether the first matching value is greater than the first preset value. If the first matching value is greater than the first preset value, step S604 is performed, otherwise step S606 is performed.
  • Step S604 selecting a sample to be classified in the first classifier as the recognized face.
  • the first matching value is greater than the first preset value, it indicates that the to-be-identified face is successfully matched with the sample to be classified in the first classifier, and the sample to be classified is selected to be recognized. Face.
  • Step S606 calculating a second matching value of the to-be-identified face and the sample to be classified in the second classifier.
  • the second matching value of the to-be-identified face and the sample to be classified in the second classifier is calculated according to the face histogram.
  • Step S608 determining whether the second matching value is greater than a second preset value.
  • Step S610 When the second matching value is greater than the second preset value, select a sample to be classified in the second classifier as the recognized human face.
  • the face recognition method proposed in this embodiment can reduce the error acceptance rate and the false rejection rate, thereby improving the accuracy of face recognition.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed are a face recognition method, wherein same is applied to an application server and comprises: acquiring information of a face to be recognized; calculating matching values between the face to be recognized and samples to be classified in classifiers connected in series, respectively; if the matching values are all less than a pre-set value, inputting the face to be recognized to the classifiers connected in parallel; selecting a pre-set number of samples to be classified that have a high degree of similarity; assigning values to the samples to be classified and calculating corresponding weight values; and selecting the sample to be classified that has the minimum weight value as the recognized face. Further provided are an application server and a computer-readable storage medium. By means of the face recognition method, the application server and the computer-readable storage medium provided in the present application, the error acceptance rate and the error rejection rate can be reduced, thereby improving the accuracy of face recognition.

Description

人脸识别方法、应用服务器及计算机可读存储介质Face recognition method, application server and computer readable storage medium
本申请要求于2017年11月17日提交中国专利局、申请号为201711141724.8、发明名称为“人脸识别方法、应用服务器及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese Patent Application filed on November 17, 2017, the Chinese Patent Office, the application number is 201711141724.8, and the invention is entitled "Face recognition method, application server and computer readable storage medium". The citation is incorporated in the application.
技术领域Technical field
本申请涉及人脸识别技术领域,尤其涉及一种人脸识别方法、应用服务器及计算机可读存储介质。The present application relates to the field of face recognition technologies, and in particular, to a face recognition method, an application server, and a computer readable storage medium.
背景技术Background technique
随着人工智能技术的发展,身份识别技术也越来越成熟,其中,包括人脸识别技术。现有人脸识别技术中,当人脸识别算法确定时,错误的接受率和错误的拒绝率会因为阈值的设置不同,而可能会出现以下情况:With the development of artificial intelligence technology, identity recognition technology is becoming more and more mature, including face recognition technology. In the existing face recognition technology, when the face recognition algorithm determines that the error acceptance rate and the error rejection rate are different due to the threshold setting, the following may occur:
(1)阈值设置过高,误判机率下降,即错误的接受率降低,同时可能出现是识别对象是本人而被拒绝的现象,也即错误的拒绝率也会升高;(1) If the threshold is set too high, the probability of false positives is reduced, that is, the acceptance rate of the error is lowered, and at the same time, the phenomenon that the recognition object is rejected by the person may be rejected, that is, the rejection rate of the error may also increase;
(2)阈值设置偏低,误判机率上升,即错误的接受率上升,错误的拒绝率同时下降。(2) The threshold setting is low, the probability of false positives is increased, that is, the acceptance rate of the error is increased, and the rejection rate of the error is simultaneously decreased.
通过以上传统固定算法的人脸识别技术,并不能满足应用的需要。The face recognition technology based on the above conventional fixed algorithm cannot meet the needs of the application.
发明内容Summary of the invention
有鉴于此,本申请提出一种人脸识别方法、应用服务器及计算机可读存储介质,以降低错误的接受率和错误的拒绝率。In view of this, the present application proposes a face recognition method, an application server, and a computer readable storage medium to reduce an erroneous acceptance rate and an erroneous rejection rate.
首先,为实现上述目的,本申请提出一种人脸识别方法,该方法包括步骤:First, in order to achieve the above object, the present application provides a face recognition method, the method comprising the steps of:
获取待识别人脸的信息;Obtaining information of the face to be recognized;
分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值;Calculating, respectively, a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner;
判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值;Determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value;
若所述待识别人脸与每一个待分类样本的匹配值均小于所述相应的预设值,则将所述待识别人脸输入至以并行方式连接的分类器,其中,所述以并行方式连接的分类器包括待分类样本;If the matching value of the to-be-identified face and each sample to be classified is smaller than the corresponding preset value, input the face to be recognized into a classifier connected in parallel, wherein the parallel The classifier connected in the manner includes samples to be classified;
按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本;Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized;
根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予不同的权重值,并计算所述待分类样本对应的总权重值;及And assigning different weight values to the samples to be classified according to the similarity between the to-be-identified face and the sample to be classified, and calculating a total weight value corresponding to the sample to be classified;
选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。The sample to be classified having the smallest total weight value is selected as the recognized face to output the sample to be classified.
此外,为实现上述目的,本申请还提供一种应用服务器,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的人脸识别系统,所述人脸识别系统被所述处理器执行时实现如上述的人脸识别方法的步骤。In addition, in order to achieve the above object, the present application further provides an application server, including a memory and a processor, where the memory stores a face recognition system operable on the processor, where the face recognition system is The steps of the face recognition method as described above are implemented when the processor is executed.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有人脸识别系统,所述人脸识别系统可被至少一个处理器执行,以使所述至少一个处理器执行如上述的人脸识别方法的步骤。Further, in order to achieve the above object, the present application further provides a computer readable storage medium storing a face recognition system, the face recognition system being executable by at least one processor to The at least one processor performs the steps of the face recognition method as described above.
相较于现有技术,本申请所提出的人脸识别方法、应用服务器及计算机可读存储介质,可以降低错误的接受率和错误的拒绝率以提升人脸识别的准确率。Compared with the prior art, the face recognition method, the application server and the computer readable storage medium proposed by the present application can reduce the error acceptance rate and the wrong rejection rate to improve the accuracy of face recognition.
附图说明DRAWINGS
图1是本申请应用服务器一可选的硬件架构的示意图;1 is a schematic diagram of an optional hardware architecture of an application server of the present application;
图2是本申请人脸识别系统第一、二、三实施例的程序模块示意图;2 is a schematic diagram of program modules of the first, second, and third embodiments of the present applicant's face recognition system;
图3是本申请人脸识别系统第四实施例的程序模块示意图;3 is a schematic diagram of a program module of a fourth embodiment of the present applicant's face recognition system;
图4是本申请人脸识别方法第一实施例的流程示意图;4 is a schematic flow chart of the first embodiment of the present applicant's face recognition method;
图5是本申请人脸识别方法第二实施例的流程示意图;5 is a schematic flow chart of a second embodiment of the present applicant's face recognition method;
图6是本申请人脸识别方法第三实施例的流程示意图。FIG. 6 is a schematic flow chart of a third embodiment of the present applicant's face recognition method.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
参阅图1所示,是本申请应用服务器2一可选的硬件架构的示意图。Referring to FIG. 1, it is a schematic diagram of an optional hardware architecture of the application server 2 of the present application.
本实施例中,所述应用服务器2可包括,但不仅限于,可通过系统总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图2仅示出了具有组件11-13的应用服务器2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In this embodiment, the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
其中,所述应用服务器2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该应用服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。The application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server. The application server 2 may be an independent server or a server cluster composed of multiple servers. .
所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述应用服务器2的内部存储单元,例如该应用服务器2的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述应用服务器2的外部存储设备,例如该应用服务器2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述应用服务器2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述应用服务器2的操作系统和各类应用软件,例如人脸识别系统200的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2. In other embodiments, the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc. Of course, the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device. In this embodiment, the memory 11 is generally used to store an operating system installed in the application server 2 and various types of application software, such as program codes of the face recognition system 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述应用服务器2的总体操作。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述人脸识别系统200等。The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the application server 2. In this embodiment, the processor 12 is configured to run program code or process data stored in the memory 11, such as running the face recognition system 200 or the like.
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述应用服务器2与其他电子设备之间建立通信连接。The network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices.
至此,己经详细介绍了本申请相关设备的硬件结构和功能。下面,将基于上述介绍提出本申请的各个实施例。So far, the hardware structure and functions of the devices related to this application have been described in detail. Hereinafter, various embodiments of the present application will be made based on the above description.
首先,本申请提出一种人脸识别系统200。参阅图2所示,是本申请人脸 识别系统200第一、二、三实施例的程序模块图。First, the present application proposes a face recognition system 200. Referring to Fig. 2, it is a program block diagram of the first, second and third embodiments of the applicant's face recognition system 200.
第一实施例First embodiment
本实施例中,所述人脸识别系统200包括一系列的存储于存储器11上的计算机程序指令,当该计算机程序指令被处理器12执行时,可以实现本申请各实施例的人脸识别操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,人脸识别系统200可以被划分为一个或多个模块。例如,在图2中,所述人脸识别系统200可以被分割成获取模块201、计算模块202、判断模块203、输入模块204、挑选模块205、赋值模块206、选择模块207、切割模块208及归一模块209。其中:In this embodiment, the face recognition system 200 includes a series of computer program instructions stored in the memory 11, and when the computer program instructions are executed by the processor 12, the face recognition operation of the embodiments of the present application can be implemented. . In some embodiments, the face recognition system 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 2, the face recognition system 200 can be divided into an acquisition module 201, a calculation module 202, a determination module 203, an input module 204, a selection module 205, an assignment module 206, a selection module 207, a cutting module 208, and Normalized module 209. among them:
所述获取模块201,用于获取待识别人脸的信息。The obtaining module 201 is configured to obtain information about a face to be recognized.
具体地,当有用户经过时,所述获取模块201获取该用户的人脸信息以对该用户进行识别。在一较佳实施例中,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。Specifically, when a user passes, the obtaining module 201 acquires face information of the user to identify the user. In a preferred embodiment, the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
所述计算模块202,用于分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值。The calculating module 202 is configured to separately calculate matching values of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
具体地,第一分类器与第二分类器以串行方式连接,所述待识别人脸依次经过第一分类器以及第二分类器以进行人脸匹配。所述计算模块202分别计算待识别人脸经过所述第一分类器以及第二分类器时,与所述第一分类器以及第二分类器中待分类样本的匹配值。需要说明的是,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练。Specifically, the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching. The calculating module 202 respectively calculates matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier. It should be noted that the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
所述判断模块203,用于判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值。The determining module 203 is configured to determine whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value.
具体地,所述计算模块202分别计算出所述待识别人脸与所述第一分类器和所述第二分类器中待分类样本的匹配值之后,所述判断模块203判断所述匹配值是否均小于相应的预设值。Specifically, after the calculating module 202 calculates the matching values of the to-be-identified face and the samples to be classified in the first classifier and the second classifier, the determining module 203 determines the matching value. Whether it is less than the corresponding preset value.
所述输入模块204,用于当所述第一分类器和所述第二分类器中待分类样 本与所述待识别人脸的匹配值均小于所述相应的预设值时,将所述待识别人脸输入至以并行方式连接的分类器。其中,所述以并行方式连接的分类器包括待分类样本。The input module 204 is configured to: when the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, The face to be recognized is input to a classifier connected in parallel. The classifiers connected in parallel include samples to be classified.
具体地,判断模块203判断出所述第一分类器和所述第二分类器中待分类样本与所述待识别人脸的匹配值均小于所述相应的预设值时,则所述判断模块203判断所述待识别人脸在所述第一分类器和所述第二分类器中均未识别成功。此时,所述输入模块204将所述待识别人脸输入至以并行方式连接的分类器。需要说明的是,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。所述并行方式连接的分类器至少包括所述第一分类器以及所述第二分类器。Specifically, when the determining module 203 determines that the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, the determining The module 203 determines that the face to be recognized is not successfully identified in the first classifier and the second classifier. At this time, the input module 204 inputs the face to be recognized to a classifier connected in parallel. It should be noted that the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time. The classifier connected in parallel includes at least the first classifier and the second classifier.
所述挑选模块205,用于按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本。The selecting module 205 is configured to arrange the samples to be classified according to the similarity with the face to be recognized, and select a preset number of samples to be classified with high similarity with the face to be recognized.
具体地,所述挑选模块205根据计算出的所述待识别人脸与所述分类器中待分类样本的相似度,分别将所述待分类器中的所述待分类样本与所述待识别人脸相似度由高至低顺序排列。所述挑选模块205并且从排列完成的所述待分类样本中挑选出前N个与所述待识别人脸相似度高的待分类样本。在本实施例中,N=2。举例说明:挑选模块205挑选出第一分类器中的待分类样本A以及待分类样本B,并挑选出第二分类器中的待分类样本A以及待分类样本B。Specifically, the selecting module 205 separately compares the sample to be classified in the to-be-classifier with the to-be-identified according to the calculated similarity between the to-be-identified face and the sample to be classified in the classifier. Face similarity is arranged in descending order. The selecting module 205 selects, from the aligned samples to be sorted, the first N samples to be classified that are similar to the face to be recognized. In the present embodiment, N = 2. For example, the selection module 205 selects the sample A to be classified and the sample B to be classified in the first classifier, and selects the sample A to be classified and the sample B to be classified in the second classifier.
所述赋值模块206,用于根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予不同的权重值,并计算所述待分类样本对应的总权重值。The value-adding module 206 is configured to assign different weight values to the samples to be classified according to the similarity between the to-be-identified face and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
具体地,所述赋值模块206分别根据所述待识别人脸与所述待分类样本的相似度对挑选出的前2个待分类样本分别赋予不同的权重值,并计算前2个待分类样本获得的总权重值。例如:所述挑选模块205挑选出待分类样本A和待分类样本B之后,所述赋值模块206对待分类样本A和待分类样本B分别赋予不同的权重值,其中,第一分类器中赋值模块206赋予待分类样本A的权重值为1, 赋予待分类样本B的权重值为2,第二分类器中赋值模块206赋予待分类样本A的权重值为2,赋予待分类样本B的权重值为2,此时待分类样本A获得总权重值为3,待分类样本B获得总权重值为4。Specifically, the evaluation module 206 assigns different weight values to the selected first two to-be-classified samples according to the similarity between the to-be-identified face and the sample to be classified, and calculates the first two samples to be classified. The total weight value obtained. For example, after the selection module 205 selects the sample A to be classified and the sample B to be classified, the evaluation module 206 assigns different weight values to the classified sample A and the sample to be classified, respectively, wherein the first classifier has an assignment module. 206 assigns a weight value of 1 to the sample A to be classified, and a weight value of 2 to the sample B to be classified, and the weighting value of the sample A to be classified in the second classifier is 2, and the weight value of the sample B to be classified is given. 2, at this time, the sample A to be classified obtains a total weight value of 3, and the sample B to be classified obtains a total weight value of 4.
所述选择模块207,用于选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。The selecting module 207 is configured to select a sample to be classified with the smallest total weight value as the recognized human face to output the sample to be classified.
具体地,若所述第一分类器中待分类样本A获得的权重值为1,所述待分类样本B获得的权重值为2,所述第二分类器中待分类样本A获得的权重值为2,所述待分类样本B获得的权重值为2,待分类样本A获得的总权重值为3,待分类样本B获得总权重值为4,所述选择模块207选择待分类样本A作为识别出的人脸并将待分类样本A输出。在一较佳实施例中,识别出的人脸通过输出装置输出,其中所述输出装置包括显示器或报警器等。需要说明的是,所述待分类样本获得的总权重值越小表示与待识别人脸的相似度越高。Specifically, if the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified is 2, and the weight value obtained by the sample A to be classified in the second classifier 2, the sample B to be classified obtains a weight value of 2, the total weight value obtained by the sample A to be classified is 3, and the sample B to be classified obtains a total weight value of 4, and the selection module 207 selects the sample A to be classified as The recognized face is output and the sample A to be classified is output. In a preferred embodiment, the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the smaller the total weight value obtained by the sample to be classified, the higher the similarity with the face to be recognized.
在本实施例中,分类器是指当输入的数据含有多个样本,每个样本包括多个属性时,将其中一个特别的属性称作类(例如,相似程度的高、中、低)。分类器的目的在于分析输入的数据,并建立一个模型,并用这个模型对输入的数据进行分类。其中,上述分类器包括:可以使用支持向量机分类器、人工神经网络分类器、模糊分类器、贝叶斯分类器、模板匹配分类器、几何分类器等。In the present embodiment, the classifier refers to when the input data contains a plurality of samples, and each sample includes a plurality of attributes, and one of the special attributes is referred to as a class (for example, high, medium, and low degrees of similarity). The purpose of the classifier is to analyze the input data and build a model and use this model to classify the input data. The above classifier includes: a support vector machine classifier, an artificial neural network classifier, a fuzzy classifier, a Bayesian classifier, a template matching classifier, a geometric classifier, and the like can be used.
第二实施例Second embodiment
所述计算模块202,还用于计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值。The calculation module 202 is further configured to calculate a first matching value between the to-be-identified face and the sample to be classified in the first classifier.
具体地,所述计算模块202根据所述人脸直方图计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值。Specifically, the calculation module 202 calculates a first matching value of the to-be-identified face and the sample to be classified in the first classifier according to the face histogram.
所述判断模块203,还用于判断所述第一匹配值是否大于第一预设值。The determining module 203 is further configured to determine whether the first matching value is greater than a first preset value.
所述选择模块207,还用于当所述第一匹配值大于所述第一预设值时,选择所述第一分类器中待分类样本为识别出的人脸。The selecting module 207 is further configured to: when the first matching value is greater than the first preset value, select a sample to be classified in the first classifier as the recognized human face.
具体地,若所述第一匹配值大于所述第一预设值,则表示所述待识别人脸与所述第一分类器中待分类样本匹配成功,所述选择模块207选择所述待分类样本为识别出的人脸。Specifically, if the first matching value is greater than the first preset value, it indicates that the to-be-identified face matches the sample to be classified in the first classifier, and the selecting module 207 selects the to-be-selected The classification sample is the recognized face.
第三实施例Third embodiment
在本实施例中,若所述判断模块203判断出所述第一匹配值小于所述第一预设值,则:In this embodiment, if the determining module 203 determines that the first matching value is smaller than the first preset value, then:
所述计算模块202,还用于计算所述待识别人脸与第二分类器中待分类样本的第二匹配值。The calculation module 202 is further configured to calculate a second matching value of the to-be-identified face and the sample to be classified in the second classifier.
具体地,所述计算模块202根据所述人脸直方图计算所述待识别人脸与所述第二分类器中待分类样本的第二匹配值。Specifically, the calculating module 202 calculates a second matching value of the to-be-identified face and the sample to be classified in the second classifier according to the face histogram.
所述判断模块203,还用于判断所述第二匹配值是否大于第二预设值。The determining module 203 is further configured to determine whether the second matching value is greater than a second preset value.
所述选择模块207,还用于当所述第二匹配值大于所述第二预设值时,选择所述第二分类器中待分类样本为识别出的人脸。The selecting module 207 is further configured to: when the second matching value is greater than the second preset value, select a sample to be classified in the second classifier as the recognized human face.
参阅图3所示,是本申请人脸识别系统200第四实施例的程序模块图。本实施例中,所述的人脸识别系统200除了包括第一实施例中的所述获取模块201、计算模块202、判断模块203、输入模块204、挑选模块205、赋值模块206、选择模块207之外,还包括切割模块208及归一模块209。Referring to FIG. 3, it is a program module diagram of the fourth embodiment of the applicant's face recognition system 200. In this embodiment, the face recognition system 200 includes the acquisition module 201, the calculation module 202, the determination module 203, the input module 204, the selection module 205, the assignment module 206, and the selection module 207 in the first embodiment. In addition, a cutting module 208 and a normalization module 209 are also included.
所述切割模块208,用于标定切割所述待识别人脸。The cutting module 208 is configured to calibrate and cut the face to be recognized.
具体地,当所述获取模块201获取所述待识别人脸的信息之后,所述切割模块208对所述待识别人脸进行标定切割以获得并识别所述待识别人脸的特征信息。Specifically, after the acquiring module 201 acquires the information of the face to be recognized, the cutting module 208 performs calibration cutting on the face to be recognized to obtain and identify feature information of the face to be recognized.
所述归一模块209,还用于直方图归一化所述切割后的待识别人脸以得到人脸直方图。The normalization module 209 is further configured to normalize the cut face to be recognized by the histogram to obtain a face histogram.
具体地,当所述切割模块208切割完所述待识别人脸之后,所述归一模块209对所述待识别人脸进行直方图归一化以得到人脸直方图,通过将人脸直方图与待分类样本进行比较,计算所述待识别人脸与待分类样本的匹配值。Specifically, after the cutting module 208 cuts the face to be recognized, the normalization module 209 performs histogram normalization on the face to be recognized to obtain a histogram of the face, by straightening the face The graph is compared with the sample to be classified, and the matching value between the face to be recognized and the sample to be classified is calculated.
此外,本申请还提出一种人脸识别方法。In addition, the present application also proposes a face recognition method.
参阅图4所示,是本申请人脸识别方法第一实施例的流程示意图。在本实施例中,根据不同的需求,图4所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 4, it is a schematic flowchart of the first embodiment of the present applicant's face recognition method. In this embodiment, the order of execution of the steps in the flowchart shown in FIG. 4 may be changed according to different requirements, and some steps may be omitted.
步骤S400,获取待识别人脸的信息。Step S400, acquiring information of a face to be recognized.
具体地,当有用户经过时,获取该用户的人脸信息以对该用户进行识别。在一较佳实施例中,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。Specifically, when a user passes, the face information of the user is acquired to identify the user. In a preferred embodiment, the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
步骤S402,分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值。Step S402, respectively calculating a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
具体地,第一分类器与第二分类器以串行方式连接,所述待识别人脸依次经过第一分类器以及第二分类器以进行人脸匹配。分别计算待识别人脸经过所述第一分类器以及第二分类器时,与所述第一分类器以及第二分类器中待分类样本的匹配值。需要说明的是,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练。Specifically, the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching. And matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier, respectively. It should be noted that the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
步骤S404,判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值。Step S404, determining whether the matching value of the to-be-identified face and each sample to be classified is smaller than a corresponding preset value.
具体地,分别计算出所述待识别人脸与所述第一分类器和所述第二分类器中待分类样本的匹配值之后,判断所述匹配值是否均小于相应的预设值。Specifically, after the matching values of the to-be-identified face and the samples to be classified in the first classifier and the second classifier are respectively calculated, it is determined whether the matching values are all smaller than the corresponding preset values.
步骤S406,当所述第一分类器和所述第二分类器中待分类样本与所述待识别人脸的匹配值均小于所述相应的预设值时,将所述待识别人脸输入至以并行方式连接的分类器。其中,所述以并行方式连接的分类器包括待分类样本。Step S406, when the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, the face to be recognized is input. To classifiers connected in parallel. The classifiers connected in parallel include samples to be classified.
具体地,判断出所述第一分类器和所述第二分类器中待分类样本与所述待识别人脸的匹配值均小于所述相应的预设值时,则判断所述待识别人脸在所述第一分类器和所述第二分类器中均未识别成功。此时,将所述待识别人 脸输入至以并行方式连接的分类器。需要说明的是,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。所述并行方式连接的分类器至少包括所述第一分类器以及所述第二分类器。Specifically, when it is determined that the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, determining the person to be identified The face is not recognized successfully in both the first classifier and the second classifier. At this time, the face to be recognized is input to a classifier connected in parallel. It should be noted that the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time. The classifier connected in parallel includes at least the first classifier and the second classifier.
步骤S408,按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本。Step S408: Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized.
具体地,根据计算出的所述待识别人脸与所述分类器中待分类样本的相似度,分别将所述待分类器中的所述待分类样本与所述待识别人脸相似度由高至低顺序排列。并且,从排列完成的所述待分类样本中挑选出前N个与所述待识别人脸相似度高的待分类样本。在本实施例中,N=2。举例说明:挑选出第一分类器中的待分类样本A以及待分类样本B,并挑选出第二分类器中的待分类样本A以及待分类样本B。Specifically, according to the calculated similarity between the to-be-identified face and the sample to be classified in the classifier, respectively, the similarity between the sample to be classified and the face to be recognized in the classifier is High to low order. And, the first N samples to be classified with high similarity to the face to be recognized are selected from the samples to be classified that are arranged. In the present embodiment, N = 2. For example, the sample A to be classified and the sample B to be classified in the first classifier are selected, and the sample A to be classified and the sample B to be classified in the second classifier are selected.
步骤S410,根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予不同的权重值,并计算所述待分类样本对应的总权重值。Step S410: assign different weight values to the samples to be classified according to the similarity between the to-be-identified face and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
具体地,根据所述待识别人脸与所述待分类样本的相似度分别对挑选出的前2个待分类样本分别赋予不同的权重值,并计算前2个待分类样本获得的总权重值。例如:挑选出待分类样本A和待分类样本B之后,对待分类样本A和待分类样本B分别赋予不同的权重值,其中,赋予第一分类器中待分类样本A的权重值为1,赋予第一分类器中待分类样本B的权重值为2,赋予第二分类器中待分类样本A的权重值为2,赋予第二分类器中待分类样本B的权重值为2,此时待分类样本A获得总权重值为3,待分类样本B获得总权重值为4。Specifically, different weight values are respectively assigned to the first two samples to be classified according to the similarity between the face to be identified and the sample to be classified, and the total weights obtained by the first two samples to be classified are calculated. . For example, after selecting the sample A to be classified and the sample B to be classified, the sample to be classified A and the sample to be classified B are respectively given different weight values, wherein the weight value of the sample A to be classified in the first classifier is given 1 The weight value of the sample B to be classified in the first classifier is 2, and the weight value of the sample A to be classified in the second classifier is 2, and the weight value of the sample B to be classified in the second classifier is 2, and the time is The classification sample A obtains a total weight value of 3, and the sample to be classified B obtains a total weight value of 4.
步骤S412,选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。Step S412, selecting a sample to be classified with the smallest total weight value as the recognized face to output the sample to be classified.
具体地,若所述第一分类器中待分类样本A获得的权重值为1,所述待分类样本B获得的权重值为2,所述第二分类器中待分类样本A获得的权重值为2,所述待分类样本B获得的权重值为2,待分类样本A获得总权重值为3,待分类样本B获得总权重值为4,选择待分类样本A作为识别出的人脸并将待分类样本 A输出。在一较佳实施例中,识别出的人脸通过输出装置输出,其中所述输出装置包括显示器或报警器等。需要说明的是,人脸相似度越高,获得票数越少。Specifically, if the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified is 2, and the weight value obtained by the sample A to be classified in the second classifier 2, the sample B to be classified obtains a weight value of 2, the sample A to be classified obtains a total weight value of 3, and the sample B to be classified obtains a total weight value of 4, and the sample A to be classified is selected as the recognized face and The sample A to be classified is output. In a preferred embodiment, the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the higher the similarity of the face, the fewer the number of votes obtained.
在本实施例中,分类器是指当输入的数据含有多个样本,每个样本包括多个属性时,将其中一个特别的属性称作类(例如,相似程度的高、中、低)。分类器的目的在于分析输入的数据,并建立一个模型,并用这个模型对输入的数据进行分类。其中,上述分类器包括:可以使用支持向量机分类器、人工神经网络分类器、模糊分类器、贝叶斯分类器、模板匹配分类器、几何分类器等。In the present embodiment, the classifier refers to when the input data contains a plurality of samples, and each sample includes a plurality of attributes, and one of the special attributes is referred to as a class (for example, high, medium, and low degrees of similarity). The purpose of the classifier is to analyze the input data and build a model and use this model to classify the input data. The above classifier includes: a support vector machine classifier, an artificial neural network classifier, a fuzzy classifier, a Bayesian classifier, a template matching classifier, a geometric classifier, and the like can be used.
如图5所示,是本申请人脸识别方法的第二实施例的流程示意图。本实施例中,所述人脸识别方法的步骤S500,S506-S516与第一实施例的步骤S400-S412相类似,区别在于该方法还包括步骤S502-S504。As shown in FIG. 5, it is a schematic flowchart of the second embodiment of the present applicant's face recognition method. In this embodiment, the steps S500, S506-S516 of the face recognition method are similar to the steps S400-S412 of the first embodiment, except that the method further includes steps S502-S504.
该方法包括以下步骤:The method includes the following steps:
步骤S500,获取待识别人脸的信息。Step S500, obtaining information of a face to be recognized.
具体地,当有用户经过时,获取该用户的人脸信息以对该用户进行识别。在一较佳实施例中,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。Specifically, when a user passes, the face information of the user is acquired to identify the user. In a preferred embodiment, the face to be recognized can be collected by any device such as a camera, a digital camera, or a scanner.
步骤S502,标定切割所述待识别人脸。Step S502, calibrating and cutting the face to be recognized.
具体地,当获取所述待识别人脸的信息之后,对所述待识别人脸进行标定切割以获得并识别所述待识别人脸的特征信息。Specifically, after acquiring the information of the face to be recognized, the face to be recognized is subjected to calibration cutting to obtain and identify feature information of the face to be recognized.
步骤S504,直方图归一化所述切割后的待识别人脸以得到人脸直方图,以便通过人脸直方图计算所述待识别人脸与所述待分类样本的匹配值。Step S504, the histogram normalizes the cut face to be recognized to obtain a face histogram, so as to calculate a matching value between the face to be recognized and the sample to be classified through a face histogram.
具体地,当切割完所述待识别人脸之后,对所述待识别人脸进行直方图归一化以得到人脸直方图,以便通过人脸直方图计算所述待识别人脸与所述待分类样本的匹配值。Specifically, after the face to be recognized is cut, a histogram normalization is performed on the face to be recognized to obtain a face histogram, so that the face to be recognized is calculated by the face histogram and the face The matching value of the sample to be classified.
步骤S506,分别计算所述待识别人脸与以串行方式连接的分类器中待分 类样本的匹配值。Step S506, respectively calculating a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner.
具体地,第一分类器与第二分类器以串行方式连接,所述待识别人脸依次经过第一分类器以及第二分类器以进行人脸匹配。分别计算待识别人脸经过所述第一分类器以及第二分类器时,与所述第一分类器以及第二分类器中待分类样本的匹配值。需要说明的是,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练。Specifically, the first classifier and the second classifier are connected in a serial manner, and the to-be-identified face passes through the first classifier and the second classifier in sequence to perform face matching. And matching values of the samples to be classified in the first classifier and the second classifier when the face to be recognized passes through the first classifier and the second classifier, respectively. It should be noted that the serial mode indicates that each respective classifier is sample-trained in time with each different subset in time.
步骤S508,判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值。Step S508, determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value.
具体地,分别计算出所述待识别人脸与所述第一分类器和所述第二分类器中待分类样本的匹配值之后,判断所述匹配值是否均小于相应的预设值。Specifically, after the matching values of the to-be-identified face and the samples to be classified in the first classifier and the second classifier are respectively calculated, it is determined whether the matching values are all smaller than the corresponding preset values.
步骤S510,当所述第一分类器和所述第二分类器中待分类样本与所述待识别人脸的匹配值均小于所述相应的预设值时,将所述待识别人脸输入至以并行方式连接的分类器。其中,所述以并行方式连接的分类器包括待分类样本。Step S510, when the matching value of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, input the face to be recognized To classifiers connected in parallel. The classifiers connected in parallel include samples to be classified.
具体地,判断出所述第一分类器和所述第二分类器中待分类样本与所述待识别人脸的匹配值均小于所述相应的预设值时,则判断所述待识别人脸在所述第一分类器和所述第二分类器中均未识别成功。此时,将所述待识别人脸输入至以并行方式连接的分类器。需要说明的是,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。所述并行方式连接的分类器至少包括所述第一分类器以及所述第二分类器。Specifically, when it is determined that the matching values of the sample to be classified and the face to be recognized in the first classifier and the second classifier are both smaller than the corresponding preset value, determining the person to be identified The face is not recognized successfully in both the first classifier and the second classifier. At this time, the face to be recognized is input to a classifier connected in parallel. It should be noted that the parallel mode indicates that each of the corresponding classifiers is sampled with different subsets at the same time. The classifier connected in parallel includes at least the first classifier and the second classifier.
步骤S512,按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本。Step S512, the samples to be classified are arranged according to the similarity with the face to be recognized, and a predetermined number of samples to be classified with high similarity with the face to be recognized are selected.
具体地,根据计算出的所述待识别人脸与所述分类器中待分类样本的相似度,分别将所述待分类器中的所述待分类样本与所述待识别人脸相似度由高至低顺序排列。并且,从排列完成的所述待分类样本中挑选出前N个与所述待识别人脸相似度高的待分类样本。在本实施例中,N=2。举例说明:挑选出 第一分类器中的待分类样本A以及待分类样本B,并挑选出第二分类器中的待分类样本A以及待分类样本B。Specifically, according to the calculated similarity between the to-be-identified face and the sample to be classified in the classifier, respectively, the similarity between the sample to be classified and the face to be recognized in the classifier is High to low order. And, the first N samples to be classified with high similarity to the face to be recognized are selected from the samples to be classified that are arranged. In the present embodiment, N = 2. For example, the sample A to be classified and the sample B to be classified in the first classifier are selected, and the sample A to be classified and the sample B to be classified in the second classifier are selected.
步骤S514,根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予不同的权重值,并计算所述待分类样本对应的总权重值。Step S514: assign different weight values to the samples to be classified according to the similarity between the face to be identified and the sample to be classified, and calculate a total weight value corresponding to the sample to be classified.
具体地,根据所述待识别人脸与所述待分类样本的相似度分别对挑选出的前2个待分类样本赋予不同的权重值,并计算前2个待分类样本获得的总投权重值。例如:挑选出待分类样本A和待分类样本B之后,分别赋予待分类样本A和待分类样本B相应的权重值,其中,赋予第一分类器中待分类样本A的权重值为1,赋予第一分类器中待分类样本B的权重值为2,赋予第二分类器中待分类样本A的权重值为2,赋予第二分类器中待分类样本B的权重值为2,此时待分类样本A获得总权重值为3,待分类样本B获得总权重值为4。Specifically, the first two to-be-classified samples are assigned different weight values according to the similarity between the to-be-identified face and the sample to be classified, and the total weights obtained by the first two samples to be classified are calculated. . For example, after selecting the sample A to be classified and the sample B to be classified, the weight values corresponding to the sample A to be classified and the sample B to be classified are respectively assigned, wherein the weight value of the sample A to be classified in the first classifier is assigned to 1, The weight value of the sample B to be classified in the first classifier is 2, and the weight value of the sample A to be classified in the second classifier is 2, and the weight value of the sample B to be classified in the second classifier is 2, and the time is The classification sample A obtains a total weight value of 3, and the sample to be classified B obtains a total weight value of 4.
步骤S516,选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。Step S516, selecting a sample to be classified with the smallest total weight value as the recognized human face to output the sample to be classified.
具体地,若所述第一分类器中待分类样本A获得的权重值为1,所述第一分类器中待分类样本B获得的权重值为2,所述第二分类器中待分类样本A获得的权重值为2,所述第二分类器中待分类样本B获得的权重值为2,待分类样本A获得的总权重值为3,待分类样本B获得总权重值为4,选择待分类样本A作为识别出的人脸并将待分类样本A输出。在一较佳实施例中,识别出的人脸通过输出装置输出,其中所述输出装置包括显示器或报警器等。需要说明的是,人脸相似度越高,获得票数越少。Specifically, if the weight value obtained by the sample A to be classified in the first classifier is 1, the weight value obtained by the sample B to be classified in the first classifier is 2, and the sample to be classified in the second classifier A obtains a weight value of 2, a weight value obtained by the sample B to be classified in the second classifier is 2, a total weight value obtained by the sample A to be classified is 3, and a total weight value of 4 to be classified is selected. The sample A to be classified is taken as the recognized face and the sample A to be classified is output. In a preferred embodiment, the recognized face is output by an output device, wherein the output device includes a display or an alarm or the like. It should be noted that the higher the similarity of the face, the fewer the number of votes obtained.
如图6所示,是本申请人脸识别方法的第三实施例的流程示意图。本实施例中,第二实施例的步骤S506还包括以下步骤:FIG. 6 is a schematic flowchart diagram of a third embodiment of the present applicant's face recognition method. In this embodiment, step S506 of the second embodiment further includes the following steps:
步骤S600,计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值。Step S600: Calculate a first matching value between the to-be-identified face and the sample to be classified in the first classifier.
具体地,根据所述人脸直方图计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值。Specifically, the first matching value of the to-be-identified face and the sample to be classified in the first classifier is calculated according to the face histogram.
步骤S602,判断所述第一匹配值是否大于第一预设值,若所述第一匹配值大于所述第一预设值,则执行步骤S604,否则执行步骤S606。In step S602, it is determined whether the first matching value is greater than the first preset value. If the first matching value is greater than the first preset value, step S604 is performed, otherwise step S606 is performed.
步骤S604,选择所述第一分类器中待分类样本为识别出的人脸。Step S604, selecting a sample to be classified in the first classifier as the recognized face.
具体地,若所述第一匹配值大于所述第一预设值,则表示所述待识别人脸与所述第一分类器中待分类样本匹配成功,选择所述待分类样本为识别出的人脸。Specifically, if the first matching value is greater than the first preset value, it indicates that the to-be-identified face is successfully matched with the sample to be classified in the first classifier, and the sample to be classified is selected to be recognized. Face.
步骤S606,计算所述待识别人脸与第二分类器中待分类样本的第二匹配值。Step S606, calculating a second matching value of the to-be-identified face and the sample to be classified in the second classifier.
具体地,根据所述人脸直方图计算所述待识别人脸与所述第二分类器中待分类样本的第二匹配值。Specifically, the second matching value of the to-be-identified face and the sample to be classified in the second classifier is calculated according to the face histogram.
步骤S608,判断所述第二匹配值是否大于第二预设值。Step S608, determining whether the second matching value is greater than a second preset value.
步骤S610,当所述第二匹配值大于所述第二预设值时,选择所述第二分类器中待分类样本为识别出的人脸。Step S610: When the second matching value is greater than the second preset value, select a sample to be classified in the second classifier as the recognized human face.
本实施例所提出的人脸识别方法,可以降低错误的接受率和错误的拒绝率,从而提升人脸识别的准确率。The face recognition method proposed in this embodiment can reduce the error acceptance rate and the false rejection rate, thereby improving the accuracy of face recognition.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种人脸识别方法,应用于应用服务器中,其特征在于,所述方法包括步骤:A face recognition method is applied to an application server, and the method includes the steps of:
    获取待识别人脸的信息;Obtaining information of the face to be recognized;
    分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值;Calculating, respectively, a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner;
    判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值;Determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value;
    若所述待识别人脸与每一个待分类样本的匹配值均小于所述相应的预设值,则将所述待识别人脸输入至以并行方式连接的分类器,其中,所述以并行方式连接的分类器包括待分类样本;If the matching value of the to-be-identified face and each sample to be classified is smaller than the corresponding preset value, input the face to be recognized into a classifier connected in parallel, wherein the parallel The classifier connected in the manner includes samples to be classified;
    按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本;Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized;
    根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予相应的权重值,并计算所述待分类样本对应的总权重值;及And assigning a corresponding weight value to the sample to be classified according to the similarity between the face to be identified and the sample to be classified, and calculating a total weight value corresponding to the sample to be classified;
    选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。The sample to be classified having the smallest total weight value is selected as the recognized face to output the sample to be classified.
  2. 如权利要求1所述的人脸识别方法,其特征在于,所述计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值的步骤之前还包括步骤:The face recognition method according to claim 1, wherein the step of calculating the matching value of the sample to be classified in the classifier to be recognized and the classifier connected in a serial manner further comprises the steps of:
    标定切割所述待识别人脸;及Calibrating the face to be identified; and
    直方图归一化所述切割后的待识别人脸以得到人脸直方图,以便通过人脸直方图计算所述待识别人脸与所述待分类样本的匹配值。The histogram normalizes the cut face to be recognized to obtain a face histogram, so as to calculate a matching value between the face to be recognized and the sample to be classified through a face histogram.
  3. 如权利要求1所述的人脸识别方法,其特征在于,所述串行方式连接的分类器至少包括第一分类器和第二分类器,所述方法还包括步骤:The face recognition method according to claim 1, wherein the serially connected classifier includes at least a first classifier and a second classifier, and the method further comprises the steps of:
    计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值;Calculating a first matching value of the to-be-identified face and the sample to be classified in the first classifier;
    判断所述第一匹配值是否大于第一预设值;及Determining whether the first matching value is greater than a first preset value; and
    若所述第一匹配值大于所述第一预设值,则选择所述第一分类器中待分类样本为识别出的人脸。If the first matching value is greater than the first preset value, the sample to be classified in the first classifier is selected as the recognized human face.
  4. 如权利要求1所述的人脸识别方法,其特征在于,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。The face recognition method according to claim 1, wherein the face to be recognized can be collected by any one of a camera, a digital camera, and a scanner.
  5. 如权利要求1所述的人脸识别方法,其特征在于,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。The face recognition method according to claim 1, wherein the serial mode indicates that each of the respective classifiers is sample-trained in time with each different subset in time, the parallel mode representation simultaneously Different subsets perform sample training on their respective classifiers.
  6. 如权利要求1所述的人脸识别方法,其特征在于,所述待分类样本获得的总权重值最小表示与待识别人脸的相似度最高。The face recognition method according to claim 1, wherein the minimum weight value obtained by the sample to be classified indicates that the similarity to the face to be recognized is the highest.
  7. 如权利要求1所述的人脸识别方法,其特征在于,所述并行方式连接的分类器至少包括所述第一分类器以及所述第二分类器。The face recognition method according to claim 1, wherein the classifier connected in parallel includes at least the first classifier and the second classifier.
  8. 如权利要求1所述的人脸识别方法,其特征在于,所述人脸可通过显示器或者报警器输出。The face recognition method according to claim 1, wherein the face is outputtable through a display or an alarm.
  9. 一种应用服务器,其特征在于,所述应用服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的人脸识别系统,所述人脸识别系统被所述处理器执行时实现如下步骤:An application server, comprising: a memory, a processor, wherein the memory stores a face recognition system operable on the processor, the face recognition system being the processor The following steps are implemented during execution:
    获取待识别人脸的信息;Obtaining information of the face to be recognized;
    分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值;Calculating, respectively, a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner;
    判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值;Determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value;
    若所述待识别人脸与每一个待分类样本的匹配值均小于所述相应的预设值,则将所述待识别人脸输入至以并行方式连接的分类器,其中,所述以并行方式连接的分类器包括待分类样本;If the matching value of the to-be-identified face and each sample to be classified is smaller than the corresponding preset value, input the face to be recognized into a classifier connected in parallel, wherein the parallel The classifier connected in the manner includes samples to be classified;
    按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本;Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized;
    根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予相应的权重值,并计算所述待分类样本对应的总权重值;及And assigning a corresponding weight value to the sample to be classified according to the similarity between the face to be identified and the sample to be classified, and calculating a total weight value corresponding to the sample to be classified;
    选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。The sample to be classified having the smallest total weight value is selected as the recognized face to output the sample to be classified.
  10. 如权利要求9所述的应用服务器,其特征在于,所述计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值的步骤之前还包括步骤:The application server according to claim 9, wherein the step of calculating the matching value of the sample to be classified in the classifier to be identified and the classifier connected in a serial manner further comprises the steps of:
    标定切割所述待识别人脸;及Calibrating the face to be identified; and
    直方图归一化所述切割后的待识别人脸以得到人脸直方图,以便通过人脸直方图计算所述待识别人脸与所述待分类样本的匹配值。The histogram normalizes the cut face to be recognized to obtain a face histogram, so as to calculate a matching value between the face to be recognized and the sample to be classified through a face histogram.
  11. 如权利要求9所述的应用服务器,其特征在于,所述串行方式连接的分类器至少包括第一分类器和第二分类器,所述方法还包括步骤:The application server according to claim 9, wherein the serially connected classifier includes at least a first classifier and a second classifier, and the method further comprises the steps of:
    计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值;Calculating a first matching value of the to-be-identified face and the sample to be classified in the first classifier;
    判断所述第一匹配值是否大于第一预设值;及Determining whether the first matching value is greater than a first preset value; and
    若所述第一匹配值大于所述第一预设值,则选择所述第一分类器中待分类样本为识别出的人脸。If the first matching value is greater than the first preset value, the sample to be classified in the first classifier is selected as the recognized human face.
  12. 如权利要求9所述的应用服务器,其特征在于,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。The application server according to claim 9, wherein the face to be recognized can be collected by any one of a camera, a digital camera, and a scanner.
  13. 如权利要求9所述的应用服务器,其特征在于,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。The application server according to claim 9, wherein said serial mode indicates that sample training is performed on each of the respective classifiers in time by time in respective different subsets, said parallel mode representations being different at the same time The sub-sets perform sample training on their respective classifiers.
  14. 如权利要求9所述的应用服务器,其特征在于,所述待分类样本获得的总权重值最小表示与待识别人脸的相似度最高。The application server according to claim 9, wherein the minimum weight value obtained by the sample to be classified indicates that the degree of similarity to the face to be recognized is the highest.
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有人脸识别 系统,所述人脸识别系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium storing a face recognition system, the face recognition system being executable by at least one processor to cause the at least one processor to perform the following steps:
    获取待识别人脸的信息;Obtaining information of the face to be recognized;
    分别计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值;Calculating, respectively, a matching value of the to-be-classified sample in the classifier to be recognized and the classifier connected in a serial manner;
    判断所述待识别人脸与每一个待分类样本的匹配值是否均小于相应的预设值;Determining whether the matching value of the to-be-identified face and each sample to be classified is less than a corresponding preset value;
    若所述待识别人脸与每一个待分类样本的匹配值均小于所述相应的预设值,则将所述待识别人脸输入至以并行方式连接的分类器,其中,所述以并行方式连接的分类器包括待分类样本;If the matching value of the to-be-identified face and each sample to be classified is smaller than the corresponding preset value, input the face to be recognized into a classifier connected in parallel, wherein the parallel The classifier connected in the manner includes samples to be classified;
    按照与所述待识别人脸的相似度排列所述待分类样本,并挑选出预设数目的与所述待识别人脸的相似度高的待分类样本;Arranging the samples to be classified according to the similarity with the face to be recognized, and selecting a preset number of samples to be classified with high similarity with the face to be recognized;
    根据所述待识别人脸与所述待分类样本的相似度对所述待分类样本分别赋予相应的权重值,并计算所述待分类样本对应的总权重值;及And assigning a corresponding weight value to the sample to be classified according to the similarity between the face to be identified and the sample to be classified, and calculating a total weight value corresponding to the sample to be classified;
    选择总权重值最小的待分类样本作为识别出的人脸以将所述待分类样本输出。The sample to be classified having the smallest total weight value is selected as the recognized face to output the sample to be classified.
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述计算所述待识别人脸与以串行方式连接的分类器中待分类样本的匹配值的步骤之前还包括步骤:The computer readable storage medium according to claim 15, wherein said step of calculating a matching value of said to-be-identified face and a classifier to be classified in a serially connected classifier further comprises the steps of:
    标定切割所述待识别人脸;及Calibrating the face to be identified; and
    直方图归一化所述切割后的待识别人脸以得到人脸直方图,以便通过人脸直方图计算所述待识别人脸与所述待分类样本的匹配值。The histogram normalizes the cut face to be recognized to obtain a face histogram, so as to calculate a matching value between the face to be recognized and the sample to be classified through a face histogram.
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述串行方式连接的分类器至少包括第一分类器和第二分类器,所述方法还包括步骤:The computer readable storage medium of claim 15, wherein the serially connected classifier comprises at least a first classifier and a second classifier, the method further comprising the steps of:
    计算所述待识别人脸与所述第一分类器中待分类样本的第一匹配值;Calculating a first matching value of the to-be-identified face and the sample to be classified in the first classifier;
    判断所述第一匹配值是否大于第一预设值;及Determining whether the first matching value is greater than a first preset value; and
    若所述第一匹配值大于所述第一预设值,则选择所述第一分类器中待分类样本为识别出的人脸。If the first matching value is greater than the first preset value, the sample to be classified in the first classifier is selected as the recognized human face.
  18. 如权利要求15所述的计算机可读存储介质,其特征在于,所述待识别人脸可以通过摄像头、数码相机、扫描仪在内的任一种设备采集。The computer readable storage medium according to claim 15, wherein the face to be recognized is collected by any one of a camera, a digital camera, and a scanner.
  19. 如权利要求15所述的计算机可读存储介质,其特征在于,所述串行方式表示在时间上依次以各个不同的子集合对各个相应的分类器进行样本训练,所述并行方式表示同时分别以不同的子集合对其各个相应的分类器进行样本训练。A computer readable storage medium according to claim 15 wherein said serial mode representation sequentially performs sample training on respective respective classifiers in respective different subsets in time, said parallel mode representing simultaneous Sample training is performed on each of the corresponding classifiers in different subsets.
  20. 如权利要求15所述的计算机可读存储介质,其特征在于,所述待分类样本获得的总权重值最小表示与待识别人脸的相似度最高。The computer readable storage medium according to claim 15, wherein the minimum weight value obtained by the sample to be classified indicates that the degree of similarity to the face to be recognized is the highest.
PCT/CN2018/077640 2017-11-17 2018-02-28 Face recognition method, application server, and computer-readable storage medium WO2019095587A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711141724.8A CN108052864B (en) 2017-11-17 2017-11-17 Face identification method, application server and computer readable storage medium
CN201711141724.8 2017-11-17

Publications (1)

Publication Number Publication Date
WO2019095587A1 true WO2019095587A1 (en) 2019-05-23

Family

ID=62118894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077640 WO2019095587A1 (en) 2017-11-17 2018-02-28 Face recognition method, application server, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN108052864B (en)
WO (1) WO2019095587A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241664A (en) * 2019-07-18 2021-01-19 顺丰科技有限公司 Face recognition method, face recognition device, server and storage medium
CN113240394A (en) * 2021-05-19 2021-08-10 国网福建省电力有限公司 Electric power business hall service method based on artificial intelligence

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034048A (en) * 2018-07-20 2018-12-18 苏州中德宏泰电子科技股份有限公司 Face recognition algorithms models switching method and apparatus
CN109063656B (en) * 2018-08-08 2021-08-24 厦门市美亚柏科信息股份有限公司 Method and device for carrying out face query by using multiple face engines
CN109543547B (en) * 2018-10-26 2024-08-27 平安科技(深圳)有限公司 Face image recognition method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187977A (en) * 2007-12-18 2008-05-28 北京中星微电子有限公司 A face authentication method and device
US7822696B2 (en) * 2007-07-13 2010-10-26 Microsoft Corporation Histogram-based classifiers having variable bin sizes
CN102855496A (en) * 2012-08-24 2013-01-02 苏州大学 Method and system for authenticating shielded face
CN103136533A (en) * 2011-11-28 2013-06-05 汉王科技股份有限公司 Face recognition method and device based on dynamic threshold value
CN103218606A (en) * 2013-04-10 2013-07-24 哈尔滨工程大学 Multi-pose face recognition method based on face mean and variance energy images
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426314C (en) * 2005-08-02 2008-10-15 中国科学院计算技术研究所 Feature classification based multiple classifiers combined people face recognition method
CN101075291B (en) * 2006-05-18 2010-05-12 中国科学院自动化研究所 Efficient promoting exercising method for discriminating human face
CN100585617C (en) * 2008-07-04 2010-01-27 西安电子科技大学 Based on sorter integrated face identification system and method thereof
KR20160011916A (en) * 2014-07-23 2016-02-02 삼성전자주식회사 Method and apparatus of identifying user using face recognition

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822696B2 (en) * 2007-07-13 2010-10-26 Microsoft Corporation Histogram-based classifiers having variable bin sizes
CN101187977A (en) * 2007-12-18 2008-05-28 北京中星微电子有限公司 A face authentication method and device
CN103136533A (en) * 2011-11-28 2013-06-05 汉王科技股份有限公司 Face recognition method and device based on dynamic threshold value
CN102855496A (en) * 2012-08-24 2013-01-02 苏州大学 Method and system for authenticating shielded face
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device
CN103218606A (en) * 2013-04-10 2013-07-24 哈尔滨工程大学 Multi-pose face recognition method based on face mean and variance energy images

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241664A (en) * 2019-07-18 2021-01-19 顺丰科技有限公司 Face recognition method, face recognition device, server and storage medium
CN113240394A (en) * 2021-05-19 2021-08-10 国网福建省电力有限公司 Electric power business hall service method based on artificial intelligence

Also Published As

Publication number Publication date
CN108052864B (en) 2019-04-26
CN108052864A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
WO2019095587A1 (en) Face recognition method, application server, and computer-readable storage medium
CN109583332B (en) Face recognition method, face recognition system, medium, and electronic device
WO2022213465A1 (en) Neural network-based image recognition method and apparatus, electronic device, and medium
CN110362677B (en) Text data category identification method and device, storage medium and computer equipment
US20200097709A1 (en) Classification model training method, server, and storage medium
CN110796154B (en) Method, device and equipment for training object detection model
CN108171203B (en) Method and device for identifying vehicle
WO2019051941A1 (en) Method, apparatus and device for identifying vehicle type, and computer-readable storage medium
US11126827B2 (en) Method and system for image identification
WO2022105179A1 (en) Biological feature image recognition method and apparatus, and electronic device and readable storage medium
US10685008B1 (en) Feature embeddings with relative locality for fast profiling of users on streaming data
US11062120B2 (en) High speed reference point independent database filtering for fingerprint identification
CN105488463A (en) Lineal relationship recognizing method and system based on face biological features
CN111291817A (en) Image recognition method and device, electronic equipment and computer readable medium
CN106056083B (en) A kind of information processing method and terminal
WO2019020083A1 (en) Feature information-based user authentication method and device
CN113646758A (en) Information processing apparatus, personal identification apparatus, information processing method, and storage medium
CN111753863A (en) Image classification method and device, electronic equipment and storage medium
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
CN110390344B (en) Alternative frame updating method and device
CN110378389A (en) A kind of Adaboost classifier calculated machine creating device
CN112668482A (en) Face recognition training method and device, computer equipment and storage medium
CN111159481B (en) Edge prediction method and device for graph data and terminal equipment
CN112529319A (en) Grading method and device based on multi-dimensional features, computer equipment and storage medium
WO2019095768A1 (en) User information screening method, server and computer-readable storage medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 02.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18877708

Country of ref document: EP

Kind code of ref document: A1