CN108875605A - Shape of face determines method and device - Google Patents

Shape of face determines method and device Download PDF

Info

Publication number
CN108875605A
CN108875605A CN201810554081.8A CN201810554081A CN108875605A CN 108875605 A CN108875605 A CN 108875605A CN 201810554081 A CN201810554081 A CN 201810554081A CN 108875605 A CN108875605 A CN 108875605A
Authority
CN
China
Prior art keywords
face
target
network model
facial
image
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810554081.8A
Other languages
Chinese (zh)
Inventor
熊军
唐玉年
伍奇龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Het Data Resources and Cloud Technology Co Ltd
Original Assignee
Shenzhen Het Data Resources and Cloud Technology Co Ltd
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 Shenzhen Het Data Resources and Cloud Technology Co Ltd filed Critical Shenzhen Het Data Resources and Cloud Technology Co Ltd
Priority to CN201810554081.8A priority Critical patent/CN108875605A/en
Publication of CN108875605A publication Critical patent/CN108875605A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/161Detection; Localisation; Normalisation
    • G06V40/164Detection; Localisation; Normalisation using holistic features
    • 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/168Feature extraction; Face representation
    • G06V40/169Holistic features and representations, i.e. based on the facial image taken as a whole
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

This application discloses a kind of shapes of face to determine method and device.This method includes:Determine the facial contour key point of target facial image;Wherein, the target facial image is the facial image of shape of face to be determined;The facial contour key point of the target facial image is mapped in square blank image, target face contour images are obtained;The target face contour images are inputted into target network model, export target shape of face;Wherein, the target shape of face includes any one in round face, square face, oval face and heart-shaped face.Correspondingly, present invention also provides corresponding devices.Using the embodiment of the present application, the shape of face of face can be quickly determined.

Description

Shape of face determines method and device
Technical field
This application involves field of computer technology more particularly to a kind of shape of face to determine method and device.
Background technique
The judgement of face shape of face has certain researching value, can apply to beauty makeups, the fields such as image retrieval.With Women increasingly lies in personal external image, and many beauty websites can select different hair styles according to the difference of face shape of face, Dressing, glasses etc..And when being retrieved to a portrait picture from picture library, since picture library enormous amount causes to retrieve Speed is slow, therefore can first pass through and judge which class shape of face portrait picture belongs to, to filter out from picture library undesirable Picture, retrieved further according to the shape of face picture of similar features, thus retrieval rate can improve.
It can be seen that how to determine that shape of face is the problem of those skilled in the art are studying.
Summary of the invention
The embodiment of the present application provides a kind of shape of face and determines method and device, can quickly determine the shape of face of face.
In a first aspect, the embodiment of the present application, which provides a kind of shape of face, determines method, including:
Determine the facial contour key point of target facial image;Wherein, the target facial image is shape of face to be determined Facial image;
The facial contour key point of the target facial image is mapped in square blank image, target face is obtained Contour images;
The target face contour images are inputted into target network model, export target shape of face;Wherein, the target shape of face Including any one in round face, square face, oval face and heart-shaped face.
In the embodiment of the present application, by the way that the facial contour key point of target facial image is mapped to square blank image On, the size that directly original image is fixed to and meets target network mode input can be effectively prevented, and lead to anamorphose The case where, or lead to the situation of determining shape of face inaccuracy;To improve the recognition accuracy of image, certain face is improved The accuracy rate of type.
In one possible implementation, it is described by the target face contour images input target network model it Before, the method also includes:
Facial image sample is acquired, determines the facial contour key point of the facial image sample;
The facial contour key point of the facial image sample is mapped in square blank image, square people is obtained Face contour images;
The square facial contour image is input in network model, the training network model obtains the mesh Mark network model.
In the embodiment of the present application, on the one hand, can be with by the way that facial contour key point to be mapped in square blank image The case where effectivelying prevent that original image is directly fixed to the size for meeting convolutional neural networks input, and leading to anamorphose, To improve the recognition accuracy of image;On the other hand, it by the way that square facial contour image is input to network model, instructs Practice the network model, improves training effectiveness.
In one possible implementation, the network model is the network model by AlexNet network training;Institute It states and the square facial contour image is input in network model, the training network model obtains target network model, Including:
The square facial contour image is input in the network model, by finely tuning the AlexNet network Full articulamentum, the training network model obtains the target network model.
In the embodiment of the present application, square facial contour image is input to the AlexNet network being trained to first In, and then the full articulamentum of the trained AlexNet network of fine tuning, it not only realizes simply, but also pass through input square Facial contour image also improves trained accuracy, improves the efficiency that shape of face determines.
In one possible implementation, it is described by the target face contour images input target network model it Before, the method also includes:
Receive the target network model from training device;Wherein, the training device is used to train network model, Obtain the target network model.
In the embodiment of the present application, the target network model that shape of face determining device is utilized can also be by other devices come It obtains, i.e., is trained by training device, then the training device sends out trained network model, that is, target network model The shape of face determining device is given, so that the shape of face determining device applies the target network model.
In one possible implementation, the facial contour key point of the determining target facial image, including:
The facial contour key point of the target facial image is determined by third-party application.
In the embodiment of the present application, the facial contour key point of target facial image is determined by the third-party application of open source, So that method provided by the embodiment of the present application is realized simply, cumbersome calculating process is avoided, shape of face determining device is alleviated Workload.
In one possible implementation, the acquisition facial image sample, including:
The image of preset quantity is acquired as the facial image sample;Wherein, the preset quantity be more than or equal to 300。
In the embodiment of the present application, 300 images are greater than or equal to by acquisition, improve the training effect of convolutional neural networks Fruit avoids facial image sample very few, and can not effective training convolutional neural networks the case where.
Second aspect, the embodiment of the present application provide a kind of shape of face determining device, including:
Determination unit, for determining the facial contour key point of target facial image;Wherein, the target facial image is The facial image of shape of face to be determined;
Map unit, for the facial contour key point of the target facial image to be mapped to square blank image On, obtain target face contour images;
Input-output unit exports target shape of face for the target face contour images to be inputted target network model; Wherein, the target shape of face includes any one in round face, square face, oval face and heart-shaped face.
In one possible implementation, described device further includes:
Acquisition unit, for acquiring facial image sample;
The determination unit is also used to determine the facial contour key point of the facial image sample;
The map unit is also used to the facial contour key point of the facial image sample being mapped to square blank On image, square facial contour image is obtained;
Training unit, for the square facial contour image to be input in network model, the training network mould Type obtains the target network model.
In one possible implementation, the network model is the network model by AlexNet network training;
The training unit leads to specifically for the square facial contour image to be input in the network model Cross the full articulamentum for finely tuning the AlexNet network, the training network model.Obtain the target network model.
In one possible implementation, described device further includes:
Receiving unit, for receiving the target network model from training device;Wherein, the training device is used for Training network model, obtains the target network model.
In one possible implementation, the determination unit, specifically for determining the mesh by third-party application Mark the facial contour key point of facial image.
In one possible implementation, the acquisition unit, specifically for acquiring the image of preset quantity as institute State facial image sample;Wherein, the preset quantity is more than or equal to 300.
The third aspect, the embodiment of the present application also provides a kind of shape of face determining devices, including:Processor, memory and defeated Enter output interface, the processor and the memory, the input/output interface are interconnected by route;Wherein, the storage Device is stored with program instruction;When described program instruction is executed by the processor, execute the processor such as first aspect institute The corresponding method stated.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Computer program is stored in medium, the computer program includes program instruction, and described program instruction is when by the determining dress of shape of face When the processor set executes, the processor is made to execute method described in first aspect.
5th aspect, the embodiment of the present application provides a kind of computer program product comprising instruction, when it is in computer When upper operation, so that computer executes method described in above-mentioned first aspect.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application or in background technique below will be implemented the application Attached drawing needed in example or background technique is illustrated.
Fig. 1 is the flow diagram that a kind of shape of face provided by the embodiments of the present application determines method;
Fig. 2 is a kind of schematic diagram of face key point provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of target facial image provided by the embodiments of the present application;
Fig. 4 a is the block schematic illustration that a kind of shape of face provided by the embodiments of the present application determines method;
Fig. 4 b is a kind of schematic diagram of a scenario of shape of face provided by the embodiments of the present application;
Fig. 4 c is a kind of schematic diagram of a scenario of shape of face provided by the embodiments of the present application;
Fig. 5 is a kind of flow diagram of target network model training method provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of shape of face determining device provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of another shape of face determining device provided by the embodiments of the present application;
Fig. 8 is the structural schematic diagram of another shape of face determining device provided by the embodiments of the present application.
Specific embodiment
In order to keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application make into One step it is described in detail.
Fig. 1 is the flow diagram that a kind of shape of face provided by the embodiments of the present application determines method, which determines that method can Applied in shape of face determining device, which can be server, terminal device etc., if the terminal device may include hand Which kind of machine, tablet computer, laptop, palm PC etc., the embodiment of the present application be specially for the shape of face determining device Equipment does not make uniqueness restriction.As shown in Figure 1, the shape of face determines that method may include:
101, the facial contour key point of target facial image is determined;Wherein, above-mentioned target facial image is face to be determined The facial image of type.
In the embodiment of the present application, target facial image can be the facial image of arbitrary shape of face to be determined.It is understood that by In it needs to be determined that therefore shape of face includes at least face, the i.e. facial contour of the target facial image extremely in the target facial image It is clearly less.It is understood that for how the acquisition methods of the target facial image, the embodiment of the present application is not construed as limiting, such as may be used It is obtained, can also be obtained by mobile phone by camera.To determine the target person after getting the target facial image The facial contour key point of face image.
In the embodiment of the present application, the facial contour key point of target facial image can be determined using algorithm, such as used Edge detection robert algorithm, Sobel sobel algorithm etc. can also determine the face of target facial image using model Profile key point, such as use Active contour models snake model.
It can determine the facial contour key point of target facial image although with above-mentioned various algorithms or model, but with Upper method is more complicated, and effect is poor.Therefore, the embodiment of the present application provides a kind of straightforward procedure, not only realizes letter It is single, but also can effectively determine facial contour key point, as follows:
The facial contour key point of above-mentioned determining target facial image, including:
The facial contour key point of above-mentioned target facial image is determined by third-party application.
In the embodiment of the present application, third-party application can be the face key point of open source for third party's kit dlib, dlib The preferable kit of locating effect and be one include machine learning algorithm C++ Open-Source Tools packet.Kit dlib quilt at present It is widely used in including robot, embedded device, mobile phone and large-scale high-performance computing environment field.It therefore can be effective Face key point is done using the kit to position, and obtains face key point.Specifically, the face key point can close for 68 faces Key point, so as to determine 17 points as facial contour key point according to the key point 0 to 16 of the face key point.
102, the facial contour key point of above-mentioned target facial image is mapped in square blank image, obtains target Facial contour image.
In the embodiment of the present application, the image size due to being input to target network model is fixed, for example 227*227 picture Element etc..If directly original image (i.e. target facial image) is fixed in the size of 227*227 pixel, will lead to target Information is severely deformed in facial image, is such as likely to make the face face contour of target facial image to deform, to influence Recognition accuracy.
Therefore, facial contour key point is transplanted in square blank image in the embodiment of the present application, alternatively, can also claim Facial contour key point is mapped in square blank image, alternatively, can also claim facial contour key point being mapped to pros Shape blank sheet on piece, then zooming in or out for equal length is carried out, the information in this sampled images will not then deform.Such as Fig. 2 With shown in Fig. 3, Fig. 2 is a kind of schematic diagram of face key point provided by the embodiments of the present application.Fig. 3 is that the embodiment of the present application provides A kind of target face contour images schematic diagram.Wherein, 68 determining face key points are shown in Fig. 2, Fig. 3 is shown Schematic diagram after 17 facial contour key points in 68 face key points are mapped in square blank image.
103, above-mentioned target face contour images are inputted into target network model, exports target shape of face;Wherein, above-mentioned target Shape of face includes any one in round face, square face, oval face and heart-shaped face.
In the embodiment of the present application, target network model can be oneself trained model of the shape of face determining device;It can also Be by other devices such as training device after training, be sent to the model of the shape of face determining device.Wherein, which determines dress Oneself training network model is set, the specific implementation for obtaining the target network model can be as shown in Figure 5.
It is above-mentioned to input above-mentioned target face contour images in the case where the target network model is the training of other devices Before target network model, the above method further includes:
Receive the above-mentioned target network model from training device;Wherein, above-mentioned training device is used to train network model, Obtain above-mentioned target network model.
Specifically, the training device can be arbitrary equipment, it such as can be server, or be terminal device etc., the application Embodiment is not construed as limiting the training device.It, can be by the target network after the training device trains target network model Model is sent to the shape of face determining device, so that the shape of face determining device saves the target network model, and then is needing to face When type is predicted, implements shape of face provided by the embodiment of the present application and determine method.It is understood that how the training device specifically instructs Experienced network model, obtains the specific implementation of the target network model, and the embodiment of the present application is not construed as limiting.
Fig. 4 a is the block schematic illustration that a kind of shape of face provided by the embodiments of the present application determines method.As shown in fig. 4 a, the frame In frame schematic diagram, target network model is trained network model provided by the embodiment of the present application, target face Contour images are the square picture intercepted centered on facial contour, that is to say, that target face contour images symbol The input condition for closing target network model is that facial contour key point has been mapped in square blank image, and with people The facial contour image intercepted centered on face profile.It wherein, include round face, square face, oval face and heart-shaped face in shape of face result In any one.As shown in figures 4 b and 4 c, the scene signal of round face, square face, oval face and heart-shaped face is respectively illustrated.
The application determines method based on the face shape of face of deep learning, can be applied to beauty website or cosmetic applications In (application, APP), one can be such as uploaded by beauty APP from taking a picture, so that it is determined that the shape of face of user, is user Personalized customization suitable hair style, dressing and decoration etc..And portrait image searching field by implement the embodiment of the present application can First to filter out the picture of different shapes of face, then carries out retrieval and substantially increase retrieval rate.
Implement the embodiment of the present application, by the way that the facial contour key point of target facial image is mapped to square blank sheet As upper, the size that directly original image is fixed to and meets target network mode input can be effectively prevented, and image is caused to become The case where shape, or lead to the situation of determining shape of face inaccuracy;To improve the recognition accuracy of image, improve really The accuracy rate of shape of face;And the shape of face of automatic identification face may be implemented, realize simple possible.
It will specifically introduce how the shape of face determining device trains network model below, obtain target network model.Fig. 5 is this The flow diagram for applying for a kind of target network model training method that embodiment provides, as shown in figure 5, this method includes:
501, facial image sample is acquired, determines the facial contour key point of above-mentioned facial image sample.
Wherein, above-mentioned acquisition facial image sample, including:
The image of preset quantity is acquired as above-mentioned facial image sample;Wherein, above-mentioned preset quantity be more than or equal to 300。
In the embodiment of the present application, acquisition facial image sample is specially to acquire facial image, which is at least 300 , and the facial image is clearly facial image.Wherein, this clearly facial image include at least image facial contour be Clearly.Alternatively, acquisition facial image sample can also be greater than or equal to 300 human face photos for acquisition.It is understood that the application Embodiment using which kind of equipment acquisition facial image sample for being not construed as limiting.Mobile phone can be used such as to acquire, photograph can also be used Camera acquisition etc..It is understood that after collecting facial image sample shape of face can be marked for each facial image, thus after being Continuous training convolutional neural networks are prepared.
Wherein, the facial image sample of acquisition is at least 300, is the face due in the training process, less than 300 The training effect of image pattern is not greater than or the training effect equal to 300 is good.On the other hand, the facial image sample of acquisition When more than or equal to 300, the generalization ability for the network model trained is more preferable.
In the embodiment of the present application, the facial contour key point of facial image sample can be determined using algorithm, such as used Edge detection robert algorithm, Sobel sobel algorithm etc. can also determine the face of facial image sample using model Profile key point, such as use Active contour models snake model.
It can determine the facial contour key point of facial image sample although with above-mentioned various algorithms or model, but with Upper method is more complicated, and effect is poor.Therefore, the embodiment of the present application provides a kind of straightforward procedure, not only realizes letter It is single, but also can effectively determine facial contour key point, as follows:
The facial contour key point of above-mentioned determining facial image sample, including:
The facial contour key point of above-mentioned facial image sample is determined by third-party application.
In the embodiment of the present application, third-party application can be the face key point of open source for third party's kit dlib, dlib The preferable kit of locating effect and be one include machine learning algorithm C++ Open-Source Tools packet.Kit dlib quilt at present It is widely used in including robot, embedded device, mobile phone and large-scale high-performance computing environment field.It therefore can be effective Face key point is done using the kit to position, and obtains face key point.Specifically, the face key point can close for 68 faces Key point, so as to determine 17 points as facial contour key point according to the key point 0 to 16 of the face key point.
502, the facial contour key point of above-mentioned facial image sample is mapped in square blank image, obtains pros Shape facial contour image.
In the embodiment of the present application, square facial contour image is the facial contour key point pair with facial image sample The facial contour image answered, the face contour images are the image being mapped in square blank image.It is input to convolutional Neural Image size in network is fixed, such as can be 227*227 pixel, however every people in collected facial image sample The accounting of face in the picture is different, alternatively, the length and width of collected facial image sample differ, if directly consolidated original image It is fixed in the size of 227*227 pixel, then will lead to the severely deformed of information in facial image sample, be such as likely to make face Face contour deformation, to influence recognition accuracy.
Therefore, facial contour key point is transplanted in square blank image in the embodiment of the present application, alternatively, can also claim Facial contour key point is mapped in square blank image, alternatively, can also claim facial contour key point being mapped to pros Shape blank sheet on piece, then zooming in or out for equal length is carried out, the information in this sampled images will not then deform.
503, above-mentioned square facial contour image is input in network model, the above-mentioned network model of training obtains mesh Mark network model.
In the embodiment of the present application, the network model can be trained by convolutional neural networks, which can be (visual geometry group, VGG) network, that is, VGGNet that visual geometric group proposes, for another example GoogleNet or ResNet Etc..Alternatively, the network model can also be trained by AlexNet network, it is above-mentioned by above-mentioned square facial contour image It being input in network model, the above-mentioned network model of training obtains target network model, including:
Above-mentioned square facial contour image is input in above-mentioned network model, by finely tuning above-mentioned AlexNet network Full articulamentum, the above-mentioned network model of training obtains above-mentioned target network model.
It is understood that the AlexNet network can be by the trained network of Imagenet, in specific application, it is only necessary to micro- Adjust the weight parameter of last three layers i.e. full articulamentum, all weight parameters of fixed front layer.Specifically, finely tuning the AlexNet Last three layers of the weight parameter of network, such as according to the loss function of the shape of face of AlexNet network output and the shape of face of label To train the AlexNet network.
It is understood that the AlexNet network in the embodiment of the present application is 2012, Hinton seminar is in order to prove depth The potentiality of study participate in the match of ImageNet image recognition for the first time, are won at one stroke by CNN network, that is, AlexNet of building Champion, and roll the classification performance of second place.But by training it to be preferably suitable for shape of face pre- for the embodiment of the present application It surveys.
Wherein, after obtaining target network model, shape of face can be predicted using the specific implementation of Fig. 1.
Implement in the embodiment of the present application, on the one hand, by the way that facial contour key point is mapped in square blank image, The size that directly original image is fixed to and meets convolutional neural networks input can be effectively prevented, and lead to the feelings of anamorphose Condition, to improve the recognition accuracy of image;On the other hand, by the way that square facial contour image is input to convolutional Neural Network, the training convolutional neural networks, improves training effectiveness.
It is understood that emphasis has difference in Fig. 1 and method shown in fig. 5, therefore, for not detailed in one embodiment The implementation of description reference may also be made to another embodiment.
It is above-mentioned to illustrate the method for the embodiment of the present application, the device of the embodiment of the present application is provided below.
Fig. 6 is a kind of structural schematic diagram of shape of face determining device provided by the embodiments of the present application, which can To include:
Determination unit 601, for determining the facial contour key point of target facial image;Wherein, above-mentioned target face figure Facial image as being shape of face to be determined;
Map unit 602, for the facial contour key point of above-mentioned target facial image to be mapped to square blank sheet As upper, target face contour images are obtained;
Input-output unit 603 exports target face for above-mentioned target face contour images to be inputted target network model Type;Wherein, above-mentioned target shape of face includes any one in round face, square face, oval face and heart-shaped face.
Implement the embodiment of the present application, by the way that the facial contour key point of target facial image is mapped to square blank sheet As upper, the size that directly original image is fixed to and meets target network mode input can be effectively prevented, and image is caused to become The case where shape, or lead to the situation of determining shape of face inaccuracy;To improve the recognition accuracy of image, improve really The accuracy rate of shape of face;And the shape of face of automatic identification face may be implemented, realize simple possible.
Optionally, as shown in fig. 7, above-mentioned apparatus further includes:
Acquisition unit 604, for acquiring facial image sample;
Determination unit 601 is also used to determine the facial contour key point of above-mentioned facial image sample;
Map unit 602 is also used to the facial contour key point of above-mentioned facial image sample being mapped to square blank On image, square facial contour image is obtained;
Training unit 605, for above-mentioned square facial contour image to be input in network model, the above-mentioned network of training Model obtains target network model.
Implement the embodiment of the present application, on the one hand, can by the way that facial contour key point to be mapped in square blank image The case where to effectively prevent directly by original image fixed to meeting the size of network model input, and leading to anamorphose, from And improve the recognition accuracy of image;On the other hand, by the way that square facial contour image is input to network model, training The network model, improves training effectiveness.
Specifically, the network model is the network model by AlexNet network training;
Above-mentioned training unit 605, specifically for above-mentioned square facial contour image is input in above-mentioned network model, By finely tuning the full articulamentum of above-mentioned AlexNet network, the above-mentioned network model of training.Obtain target network model.
Optionally, as shown in fig. 7, above-mentioned apparatus further includes:
Receiving unit 606, for receiving the above-mentioned target network model from training device;Wherein, above-mentioned training device For training network model, above-mentioned target network model is obtained.
Specifically, above-mentioned determination unit 601, specifically for determining the people of above-mentioned target facial image by third-party application Face profile key point.
Specifically, above-mentioned acquisition unit 604, specifically for acquiring the image of preset quantity as above-mentioned facial image sample This;Wherein, above-mentioned preset quantity is more than or equal to 300.
It is understood that shape of face determining device provided by the embodiment of the present application can be arbitrary terminal device, it can also be service Device, alternatively, the shape of face determining device can also be client etc., specific reality of the embodiment of the present application for the shape of face determining device Existing mode is not construed as limiting.
It should be noted that the realization of each unit can also correspond to the phase with embodiment of the method shown in fig. 5 referring to Fig.1 It should describe.
Fig. 8 is a kind of shape of face determining device provided by the embodiments of the present application, the shape of face determining device include processor 801, Memory 802 and input/output interface 803, the processor 801, memory 802 and input/output interface 803 are mutual by bus Connection.
Memory 802 include but is not limited to be random access memory (random access memory, RAM), it is read-only Memory (read-only memory, ROM), Erasable Programmable Read Only Memory EPROM (erasable programmable Read only memory, EPROM) portable read-only memory (compact disc read-only memory, CD- ROM), which is used for dependent instruction and data.
Input/output interface 803, such as can be communicated etc. by the input/output interface with other devices.
Processor 801 can be one or more central processing units (central processing unit, CPU), locate In the case that reason device 801 is a CPU, which can be monokaryon CPU, be also possible to multi-core CPU.The processor 801 is for reading The program code stored in access to memory 802, to execute following operation:
Determine the facial contour key point of target facial image;Wherein, above-mentioned target facial image is shape of face to be determined Facial image;
The facial contour key point of above-mentioned target facial image is mapped in square blank image, target face is obtained Contour images;
Above-mentioned target face contour images are inputted into target network model, export target shape of face;Wherein, above-mentioned target shape of face Including any one in round face, square face, oval face and heart-shaped face.
In one embodiment, processor 801 are also used to acquire facial image sample, determine above-mentioned facial image sample Facial contour key point;The facial contour key point of above-mentioned facial image sample is mapped in square blank image, is obtained To square facial contour image;And above-mentioned square facial contour image is input in network model, the above-mentioned net of training Network model obtains above-mentioned target network model.
In one embodiment, processor 801, specifically for above-mentioned square facial contour image is input to above-mentioned net In network model, by finely tuning the full articulamentum of above-mentioned AlexNet network, the above-mentioned network model of training obtains above-mentioned target network Model.
In one embodiment, input/output interface 803, for receiving the target network mould from training device Type;Wherein, the training device obtains the target network model for training network model.
In one embodiment, processor 801, specifically for determining above-mentioned target facial image by third-party application Facial contour key point.
In one embodiment, processor 801, specifically for acquiring the image of preset quantity as above-mentioned facial image sample This;Wherein, above-mentioned preset quantity is more than or equal to 300.
It should be noted that the realization of each operation can also correspond to the phase with embodiment of the method shown in fig. 5 referring to Fig.1 It should describe.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, the process Relevant hardware can be instructed to complete by computer program, which can be stored in computer-readable storage medium, should Program is when being executed, it may include such as the process of above-mentioned each method embodiment.And storage medium above-mentioned includes:ROM is deposited at random Store up the medium of the various program storage codes such as memory body RAM, magnetic or disk.

Claims (11)

1. a kind of shape of face determines method, which is characterized in that including:
Determine the facial contour key point of target facial image;Wherein, the target facial image is the face of shape of face to be determined Image;
The facial contour key point of the target facial image is mapped in square blank image, target facial contour is obtained Image;
The target face contour images are inputted into target network model, export target shape of face;Wherein, the target shape of face includes Any one in round face, square face, oval face and heart-shaped face.
2. the method according to claim 1, wherein described input target network for the target face contour images Before network model, the method also includes:
Facial image sample is acquired, determines the facial contour key point of the facial image sample;
The facial contour key point of the facial image sample is mapped in square blank image, square face wheel is obtained Wide image;
The square facial contour image is input in network model, the training network model obtains the target network Network model.
3. according to the method described in claim 2, it is characterized in that, the network model is to pass through AlexNet network training Network model;Described that the square facial contour image is input in network model, the training network model obtains mesh Network model is marked, including:
The square facial contour image is input in the network model, by finely tuning the complete of the AlexNet network Articulamentum, the training network model, obtains the target network model.
4. the method according to claim 1, wherein described input target network for the target face contour images Before network model, the method also includes:
Receive the target network model from training device;Wherein, the training device is obtained for training network model The target network model.
5. the method according to claim 1, which is characterized in that the people of the determining target facial image Face profile key point, including:
The facial contour key point of the target facial image is determined by third-party application.
6. according to the method in claim 2 or 3, which is characterized in that the acquisition facial image sample, including:
The image of preset quantity is acquired as the facial image sample;Wherein, the preset quantity is more than or equal to 300.
7. a kind of shape of face determining device, which is characterized in that including:
Determination unit, for determining the facial contour key point of target facial image;Wherein, the target facial image is to true Determine the facial image of shape of face;
Map unit is obtained for the facial contour key point of the target facial image to be mapped to square blank image To target face contour images;
Input-output unit exports target shape of face for the target face contour images to be inputted target network model;Its In, the target shape of face includes any one in round face, square face, oval face and heart-shaped face.
8. the method according to the description of claim 7 is characterized in that described device further includes:
Acquisition unit, for acquiring facial image sample;
The determination unit is also used to determine the facial contour key point of the facial image sample;
The map unit is also used to the facial contour key point of the facial image sample being mapped to square blank image On, obtain square facial contour image;
Training unit, for the square facial contour image to be input in network model, the training network model is obtained To the target network model.
9. device according to claim 7, which is characterized in that described device further includes:
Receiving unit, for receiving the target network model from training device;Wherein, the training device is for training Network model obtains the target network model.
10. a kind of shape of face determining device, which is characterized in that including processor, memory and input/output interface, the processor It is interconnected with the memory, the input/output interface by route;Wherein, the memory is stored with program instruction, described When program instruction is executed by the processor, the processor is made to execute the corresponding method as described in claim 1 to 6.
11. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program, the computer program include program instruction, and described program instruction makes when being executed by the processor of shape of face determining device The processor perform claim requires method described in 1 to 6 any one.
CN201810554081.8A 2018-05-31 2018-05-31 Shape of face determines method and device Pending CN108875605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810554081.8A CN108875605A (en) 2018-05-31 2018-05-31 Shape of face determines method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810554081.8A CN108875605A (en) 2018-05-31 2018-05-31 Shape of face determines method and device

Publications (1)

Publication Number Publication Date
CN108875605A true CN108875605A (en) 2018-11-23

Family

ID=64336907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810554081.8A Pending CN108875605A (en) 2018-05-31 2018-05-31 Shape of face determines method and device

Country Status (1)

Country Link
CN (1) CN108875605A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091055A (en) * 2019-11-13 2020-05-01 深圳数联天下智能科技有限公司 Face shape recognition method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339612A (en) * 2008-08-19 2009-01-07 陈建峰 Face contour checking and classification method
CN102339376A (en) * 2010-07-14 2012-02-01 上海一格信息科技有限公司 Classifying and processing method based on active shape model and K nearest neighbor algorithm for facial forms of human faces
KR20150090353A (en) * 2014-01-28 2015-08-06 홍상보 Clothing matching service method
CN106980840A (en) * 2017-03-31 2017-07-25 北京小米移动软件有限公司 Shape of face matching process, device and storage medium
CN107273933A (en) * 2017-06-27 2017-10-20 北京飞搜科技有限公司 The construction method of picture charge pattern grader a kind of and apply its face tracking methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339612A (en) * 2008-08-19 2009-01-07 陈建峰 Face contour checking and classification method
CN102339376A (en) * 2010-07-14 2012-02-01 上海一格信息科技有限公司 Classifying and processing method based on active shape model and K nearest neighbor algorithm for facial forms of human faces
KR20150090353A (en) * 2014-01-28 2015-08-06 홍상보 Clothing matching service method
CN106980840A (en) * 2017-03-31 2017-07-25 北京小米移动软件有限公司 Shape of face matching process, device and storage medium
CN107273933A (en) * 2017-06-27 2017-10-20 北京飞搜科技有限公司 The construction method of picture charge pattern grader a kind of and apply its face tracking methods

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091055A (en) * 2019-11-13 2020-05-01 深圳数联天下智能科技有限公司 Face shape recognition method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108701216B (en) Face recognition method and device and intelligent terminal
CN107609519B (en) A kind of localization method and device of human face characteristic point
CN108875633B (en) Expression detection and expression driving method, device and system and storage medium
Sharma Information measure computation and its impact in mi coco dataset
CN110111418A (en) Create the method, apparatus and electronic equipment of facial model
KR101141643B1 (en) Apparatus and Method for caricature function in mobile terminal using basis of detection feature-point
CN110414428A (en) A method of generating face character information identification model
CN110110118A (en) Dressing recommended method, device, storage medium and mobile terminal
CN106803055A (en) Face identification method and device
CN105426850A (en) Human face identification based related information pushing device and method
CN108197592B (en) Information acquisition method and device
CN111008935B (en) Face image enhancement method, device, system and storage medium
CN107944435A (en) Three-dimensional face recognition method and device and processing terminal
CN110503076A (en) Video classification methods, device, equipment and medium based on artificial intelligence
CN109274891B (en) Image processing method, device and storage medium thereof
WO2019127102A1 (en) Information processing method and apparatus, cloud processing device, and computer program product
CN109063678A (en) The method, apparatus and storage medium of face image identification
CN109858333A (en) Image processing method, device, electronic equipment and computer-readable medium
CN111680550B (en) Emotion information identification method and device, storage medium and computer equipment
CN111369428A (en) Virtual head portrait generation method and device
CN113254491A (en) Information recommendation method and device, computer equipment and storage medium
CN115769260A (en) Photometric measurement based 3D object modeling
Chang et al. Salgaze: Personalizing gaze estimation using visual saliency
CN110298327A (en) A kind of visual effect processing method and processing device, storage medium and terminal
CN113298956A (en) Image processing method, nail beautifying method and device, and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123