Invention content
The present invention provides a kind of face identification method and systems, solve face identification system binding hardware support kit equipment
The problem of being not easy to carry out Function Extension to face identification system for specific environment, while also reducing extension recognition of face work(
The cost of energy.
In order to achieve the above objectives, the present invention provides following technical solutions:
A kind of face identification method, which is characterized in that including:
It perceives collecting device and acquires human face image information, and the human face image information is marked, obtain with mark
Remember the human face image information of information;
The perception collecting device sends request information on services to network analysis server, is taken in the request information on services
The band human face image information for carrying label information;
The network analysis server parses the request information on services received, and label information is carried described in acquisition
Human face image information;
Facial image feature in the network analysis server extraction human face image information with label information
Information, and human face data information is retrieved in face database according to the label information;
The network analysis server compares the facial image characteristic information and the human face data information, and
Comparing result is sent to terminal device;
The terminal device receives the comparing result, and completes recognition of face according to the comparing result.
Preferably, the perception collecting device acquires human face image information, including:
Human face image information is acquired using the perception collecting device of PC cameras or MobilePC cameras is supported.
Preferably, the face figure in the network analysis server extraction human face image information with label information
As characteristic information, and human face data information is retrieved in face database according to the label information, including:
The network analysis server is extracted by way of calculating in the human face image information with label information
Facial image characteristic information, and according to the label information based on OpenCV open image library establish face database in
Retrieve human face data information.
Preferably, the network analysis server carries out the facial image characteristic information and the human face data information
Comparison, and comparing result is sent to terminal device, including:
The network analysis server compares algorithm by calibration, by the facial image characteristic information and the face number
It is believed that breath is compared, believability threshold is obtained, the believability threshold result and is sent to as a comparison by WSS agreements
Terminal device.
Preferably, the terminal device receives the comparing result, including:
The comparing result is received using the terminal device of safety shell protocol SSH, WSS agreement is supported.
A kind of face identification system, which is characterized in that including:
Perception collecting device is marked the human face image information, is carried for acquiring human face image information
The human face image information of label information;And send request information on services to network analysis server;In the request information on services
Carry the human face image information for carrying label information;
Network analysis server, for after receiving the request information on services, being carried out to the request information on services
Parsing obtains the human face image information for carrying label information;And from the human face image information with label information
Facial image characteristic information is extracted, human face data information is retrieved in face database by the label information;It again will be described
Facial image characteristic information is compared with the human face data information, and comparing result is sent to terminal device;
Terminal device completes recognition of face for receiving the comparing result, and according to the comparing result.
Preferably, the perception collecting device includes:PC picture pick-up devices or MobilePC picture pick-up devices.
Preferably, described that facial image characteristic information is extracted from the human face image information with label information, pass through mark
Note information retrieves the network analysis server of human face data information in face database, for extracting institute by way of calculating
State the facial image characteristic information in the human face image information with label information, and according to the label information based on
OpenCV, which is opened, retrieves human face data information in the face database that image library is established.
Preferably, the network analysis that the facial image characteristic information and the human face data information are compared
Server, for by calibration comparison algorithm, the facial image characteristic information and the human face data information to be compared,
Believability threshold is obtained, the believability threshold result and is sent to terminal device by WSS agreements as a comparison.
Preferably, the terminal device is the terminal device for supporting safety shell protocol SSH, WSS agreement.
As can be seen from the above technical solutions, the invention discloses a kind of face identification method, adopted by perceiving collecting device
Collect human face image information, and the human face image information is marked, obtains the human face image information with label information;Sense
Know that collecting device sends request information on services to network analysis server, is carried in the request information on services described with label
The human face image information of information;Network analysis server parses the request information on services received, obtains described with mark
Remember the human face image information of information;The facial image feature letter in the human face image information with label information is extracted again
Breath, and human face data information is retrieved in face database according to the label information;By the facial image characteristic information with
The human face data information is compared, and comparing result is sent to terminal device;Terminal device receives the comparing result,
And complete recognition of face according to the comparing result.This method makes face identification system break away from the constraint of hardware support kit equipment,
Also reduce the cost being extended to face identification functions for specific environment simultaneously.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The present invention is based on OpenCV (abbreviation of Open Source Computer Vision Library) to open image library
Provide a kind of face identification method and system, both broken away from the constraint of hardware support kit equipment, convenient for for specific environment to people
The function of face identification is extended, and can reduce the cost of extension face identification functions.
Wherein, OpenCV is a computer vision library increased income, and is made of a series of C functions and a small amount of C++ class language,
Many general-purpose algorithms in terms of image procossing and computer vision are realized, it is more to be applied to human-computer interaction, object identification etc. at present
A field.
The present invention is based on OpenCV to open the face identification method and system that image library provides, and is based on as shown in Figure 1
PNA frame designs.The PNA frameworks include three-decker, respectively perceive acquisition layer (Perceptive Layer, PL) 101,
Network analysis layer (Network Layer, NL) 102 and application layer (Application Layer, AL) 103.
Based on PNA frameworks disclosed in above-mentioned Fig. 1, as shown in Fig. 2, for the embodiment of the invention discloses a kind of recognition of face sides
The flow chart of method, this approach includes the following steps:
Step S201:It perceives collecting device and acquires human face image information, and the human face image information is marked, obtain
To the human face image information with label information.
In the concrete realization, perception collecting device, which is equivalent to, perceives acquisition layer shown in Fig. 1.
In step s 201 perception collecting device acquisition human face image information be Static Human Face image information, or according to regarding
The human face image information that frequency stream obtains.
It should be noted that the human face image information of the perception collecting device acquisition includes to complete what recognition of face needed
Face characteristic information.
Specifically, the human face image information is static human face image information, user plane is such as shot by collecting device
Portion's photo.Alternatively, the human face image information is to obtain to include the video flowing of user's face by collecting device, and from the video
Interception includes the human face image information of user's face in stream.
Optionally, the side of correspondence is established by the human face image information and user information that acquire perception collecting device
Human face image information is marked in formula, i.e., the described label information is to believe with the facial image of the perception collecting device acquisition
The corresponding user information of manner of breathing.
Specifically, the perception collecting device acquisition facial image for supporting PC cameras or MobilePC cameras may be used
Information.For example, smart mobile phone or laptop with camera.That is, the perception acquisition in the embodiment of the present invention
Equipment is to support the mainstream picture pick-up device of the plurality of access modes accesses such as H5 accesses, WEB accesses.It can be for example, by mobile phone or clear
Device of looking at carries camera and completes human image collecting.
Step S202:The perception collecting device sends request information on services, the request clothes to network analysis server
The human face image information for carrying label information is carried in information of being engaged in.
In the concrete realization, network analysis server is equivalent to network analysis layer shown in Fig. 1, the request service letter
Breath passes through in request for initiating data processing request to network analysis server and establishes long connect with network analysis server afterwards
It connects.
Optionally, the perception collecting device sends request information on services by WSS agreements to network analysis server.
It should be noted that network socket security protocol (Web Socket Secure, WSS) belongs to network socket transmission
The encryption version of agreement (Web Socket, WS).The data of network socket transport protocol transmission are not encrypted, this makes data
It is easy to be stolen, therefore, people are by network socket transport protocol and Secure Socket Layer (Secure Sockets Layer, SSL)
In conjunction with realizing safe network socket transport protocol communication, i.e. network socket security protocol.
Step S203:The network analysis server parses the request information on services received, is carried described in acquisition
The human face image information of label information.
Specifically, network analysis server is after receiving the request information on services sent of perception collecting device, to described
Request information on services is parsed, and the human face image information carried in the request information on services is obtained.The facial image letter
Breath is the human face image information with label information.
Step S204:Face in the network analysis server extraction human face image information with label information
Image feature information, and human face data information is retrieved in face database according to the label information.
Optionally, network analysis server extracts the human face image information for carrying label information by way of calculating
In facial image characteristic information, and according to the label information based on OpenCV open image library establish face database
Middle retrieval human face data information.
Specifically, the core algorithms such as CNN convolution, gradient optimizing, fitting matching, extraction may be used in network analysis server
Facial image characteristic information in the human face image information with label information.
For ease of understanding, the process illustrated below that facial image characteristic information is calculated using CNN convolution algorithms:
The pixel of the facial image that one pixel of input is 32x32, convolution kernel is 5x5, and a convolution kernel generates a spy
Sign figure.Usually indicate that the image pixel of input, FxF indicate the pixel of convolution kernel with NxN.According to above-mentioned input, the value of N at this time
Value for 32, F is 5.Based on the calculating process of (N-F)/stride+1, it is special that the facial image that pixel is 28x28 can be obtained
Reference ceases, wherein stride is the distance of adjacent convolution kernel, and stride takes 1 under normal circumstances.
Step S205:The network analysis server by the facial image characteristic information and the human face data information into
Row comparison, and comparing result is sent to terminal device.
In the concrete realization, terminal device is equivalent to application layer shown in Fig. 1.
Optionally, network analysis server can compare algorithm by calibration, by the facial image characteristic information and institute
It states human face data information to be compared, obtains believability threshold, the believability threshold result and is assisted as a comparison by WSS
View is sent to terminal device.
Optionally, comparing result is sent to terminal device by network analysis server in real time by WSS agreements.
Step S206:The terminal device receives the comparing result, and completes recognition of face according to the comparing result.
It should be noted that any support safety shell protocol (Secure Shell, SSH), WSS agreements may be used
Terminal device receives the comparing result.For example, supporting the mobile phone etc. of WSS.
Optionally, it after terminal device completes recognition of face according to the comparing result, can be answered according to specific scene
Carry out subsequent operation with face recognition result, for example, in the working of certain company registers and checks card application scenarios, when recognition of face at
When work(, working punching operation is completed.
The embodiment of the invention discloses a kind of face identification methods, and human face image information is acquired by perceiving collecting device,
And the human face image information is marked, obtain the human face image information with label information;Collecting device is perceived to net
Network Analysis server sends request information on services, and the facial image for carrying label information is carried in the request information on services
Information;Network analysis server parses the request information on services received, obtains the face figure for carrying label information
As information;The facial image characteristic information in the human face image information with label information is extracted again, and according to the mark
Note information retrieves human face data information in face database;By the facial image characteristic information and the human face data information
It is compared, and comparing result is sent to terminal device;Terminal device receives the comparing result, and is tied according to the comparison
Fruit completes recognition of face.This method makes face identification system break away from the constraint of hardware support kit equipment, while also reducing and being directed to
The cost that specific environment is extended face identification functions.
For ease of understanding, the present invention provides a kind of concrete application embodiments of face identification method, based on shown in FIG. 1
The framework of the face identification method is executed, in a particular application:
First, the human face image information of perception acquisition layer acquisition user, the human face image information of user and user are inputted
User information establish correspondence, using user information corresponding with human face image information to the human face image information carry out
Label obtains carrying human face image information of the user information as label information.
Then, perception acquisition layer initiates request information on services, the request information on services by WSS agreements to network analysis layer
Including the human face image information with label information.
Then, network analysis layer is after receiving request information on services, based on the request information on services and perception acquisition layer
Long connection is established, and using the core algorithms such as CNN convolution, gradient optimizing, fitting matching, the extraction people for carrying label information
Facial image characteristic information in face image information.
Then, network analysis layer is opening the face database that image library is established according to the label information based on OpenCV
Middle retrieval human face data information.
Then, network analysis layer compares algorithm by calibration, by the facial image characteristic information and the human face data
Information is compared, and believability threshold is obtained, and the believability threshold result and is sent in real time by WSS agreements as a comparison
To application layer.
Finally, application layer completes recognition of face according to the comparing result received.
Further, application layer can also extend the recognition of face according to specific application scenarios using the comparing result
Function.
The embodiment of the present invention can be such that face identification system breaks away from by perceiving acquisition layer, network analysis layer and application layer
Dependence to traditional collecting device, and support SSH, WSS security protocol.
Based on face identification method disclosed in the embodiments of the present invention, Fig. 3 is specifically disclosed using the recognition of face side
The face identification system of method.
As shown in figure 3, an embodiment of the present invention provides a kind of schematic diagram of face identification system, which includes:
Perception collecting device 301 is marked the human face image information, obtains for acquiring human face image information
Human face image information with label information;And send request information on services to network analysis server 302;The request service
The human face image information for carrying label information is carried in information;
Network analysis server 302, for after receiving the request information on services, to the request information on services into
Row parsing obtains the human face image information for carrying label information;And from the human face image information with label information
Middle extraction facial image characteristic information, human face data information is retrieved by the label information in face database;Again by institute
It states facial image characteristic information to be compared with the human face data information, comparing result is sent to terminal device 303;
Terminal device 303 completes recognition of face for receiving the comparing result, and according to the comparing result.
Optionally, the network analysis that the facial image characteristic information and the human face data information are compared
Server 302 carries out the facial image characteristic information and the human face data information pair for comparing algorithm by calibration
Than obtaining believability threshold, the believability threshold result and being sent to terminal device 303 by WSS agreements as a comparison.
Optionally, described that facial image characteristic information is extracted from the human face image information with label information, pass through mark
Note information retrieves the network analysis server 302 of human face data information in face database, for being carried by way of calculating
Take the facial image characteristic information in the human face image information with label information, and according to the label information based on
OpenCV, which is opened, retrieves human face data information in the face database that image library is established.
Optionally, the perception collecting device 301 includes:PC picture pick-up devices or MobilePC picture pick-up devices.
Optionally, the terminal device 303 is the terminal device of any support SSH agreements, WSS agreements.
In addition, the system relies on Web Java exploitations, there is very high transplantability, may operate in any environment, and
And support privately owned high in the clouds and public cloud end administration, while supporting the plurality of access modes such as H5 accesses, WEB accesses.
Perception collecting device 301 in a kind of face identification system disclosed by the embodiments of the present invention, network analysis clothes above
The specific implementation procedure and implementation principle of business device 302 and terminal device 303 can be found in people disclosed in the above embodiment of the present invention
Perceive what collecting device 301, the network analysis server 302 and the terminal device 303 were related to described in face recognition method
Part is not discussed here.
In conclusion face identification method disclosed by the invention and system, facial image is acquired by perceiving collecting device
Information, and the human face image information is marked, obtain the human face image information with label information;Perceive collecting device
Request information on services is sent to network analysis server, the face for carrying label information is carried in the request information on services
Image information;Network analysis server parses the request information on services received, obtains the people for carrying label information
Face image information;The facial image characteristic information in the human face image information with label information is extracted again, and according to institute
It states label information and retrieves human face data information in face database;By the facial image characteristic information and the human face data
Information is compared, and comparing result is sent to terminal device;Terminal device receives the comparing result, and according to described right
Recognition of face is completed than result.This method makes face identification system break away from the constraint of hardware support kit equipment, also reduces simultaneously
The cost that face identification functions are extended for specific environment.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
The above is only the specific implementation mode of the application, it is noted that for the ordinary skill people of the art
For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered
It is considered as the protection domain of the application.