CN112785500A - Hair style previewing method, storage medium and electronic equipment - Google Patents

Hair style previewing method, storage medium and electronic equipment Download PDF

Info

Publication number
CN112785500A
CN112785500A CN202110055032.1A CN202110055032A CN112785500A CN 112785500 A CN112785500 A CN 112785500A CN 202110055032 A CN202110055032 A CN 202110055032A CN 112785500 A CN112785500 A CN 112785500A
Authority
CN
China
Prior art keywords
user
recommended
face
splicing
model
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
CN202110055032.1A
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110055032.1A priority Critical patent/CN112785500A/en
Publication of CN112785500A publication Critical patent/CN112785500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/02Affine transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure provides a method for previewing a hair style, a storage medium and an electronic device, wherein the method comprises: acquiring a face image of a user and determining personal information of the user according to the face information; determining M recommended hairstyles based on personal information and displaying the hairstyles, wherein M is a positive integer; determining a face model of the user from the face image; sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results; and displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles. The personalized hairstyle is recommended for the user based on the facial image of the user, the recommended hairstyle is spliced with the facial three-dimensional model of the user, the splicing effect is improved, meanwhile, the hairstyle effect of each angle after splicing can be checked through free operations such as rotation and scaling by the user or a hairdresser, the hairdresser can understand the hairstyle requirement of the user more fully, and the satisfaction degree of the user is further improved.

Description

Hair style previewing method, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of hairdressing technologies, and in particular, to a method for previewing a hairstyle, a storage medium, and an electronic device.
Background
Hairdressing is an essential service in daily life of most residents, but customer satisfaction in the hairdressing industry is generally low, and the main reasons are that hairdressers cannot fully understand the hairstyle preference and haircut requirements of customers, and the evaluation of the satisfaction is affected due to the fact that the hairdressers are inconsistent with the expectations of the customers due to large operation freedom.
With the development of computer technology, the user can conveniently preview the hair style by splicing the face video image of the user with the pre-stored hair style model at present, but the problems of hair style cutting and replacement exist in the process of splicing the video image with the three-dimensional hair style model, so that the splicing effect is poor, and the actual requirement cannot be met.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method for previewing a hair style, a storage medium, and an electronic device, so as to solve the problem in the prior art that a stitching effect between a hair style model and a video image is not good.
The embodiment of the disclosure adopts the following technical scheme: a method of previewing a hairstyle, comprising: acquiring a face image of a user and determining personal information of the user according to the face information; determining M recommended hairstyles based on the personal information and displaying the hairstyles, wherein M is a positive integer; determining a face model of the user from the face image; sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results; and displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles.
Further, the personal information includes at least a user ID, user basic information.
Further, the determining M recommended hair styles based on the personal information includes: determining N alternative hair styles in a hair style database through a recommendation algorithm according to the personal information; respectively scoring the N alternative hairstyles; and taking M candidate hair styles with the highest scores in the N candidate hair styles as the recommended hair style, wherein N is a positive integer, and M is smaller than or equal to N.
Further, the determining a face model of the user from the face image includes: detecting whether a face model corresponding to the face image exists in a face model library or not; outputting a face model corresponding to the face image when the face model corresponding to the face image exists in the face model library; and if the face model corresponding to the face image does not exist in the face model library, generating and outputting a face model corresponding to the face image based on the face image.
Further, the sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results includes: loading the facial model and models of the M recommended hairstyles; acquiring first key coordinate information of the face model and second key coordinate information of each recommended hairstyle model; respectively splicing the face model and each recommended hairstyle model through a preset action based on the first key coordinate information and the second key coordinate information to obtain M splicing results; and storing action sequences of preset actions executed in the process of splicing the face model and each recommended hairstyle model respectively.
Further, the displaying a first splicing result corresponding to the recommended hair style selected by the user based on the selection result of the M recommended hair styles by the user includes: forming the first splicing result based on an action sequence corresponding to the recommended hairstyle selected by the user; and displaying the first splicing result.
Further, after the first splicing result corresponding to the recommended hair style selected by the user is displayed based on the selection result of the user on the M recommended hair styles, the method further includes: and optimizing the recommendation decision of the recommendation algorithm based on the feedback of the user to the first splicing result.
Further, the personal information further includes: a hair style selection history for the user; the scoring the N candidate hair styles includes: scoring the N candidate hair styles respectively based on the hair style selection history.
Embodiments of the present disclosure also provide a storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method for previewing a hairstyle as described above.
Embodiments of the present disclosure also provide an electronic device, which at least includes a memory and a processor, where the memory stores a computer program thereon, and the processor implements the steps of the method for previewing a hair style as described above when executing the computer program on the memory.
The beneficial effects of this disclosed embodiment lie in: the personalized hairstyle is recommended for the user based on the facial image of the user, the recommended hairstyle is spliced with the facial three-dimensional model of the user, so that the splicing effect is improved, meanwhile, the user or a hairdresser can check the hairstyle effect of each spliced angle through free operations such as rotation and zooming, the hairdresser can understand the hairstyle requirement of the user more fully, and the satisfaction degree of the user is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for previewing a hair style in a first embodiment of the present disclosure;
FIG. 2 is a flow chart of determining a recommended hair style based on personal information in a first embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a recommendation model in a first embodiment of the present disclosure;
FIG. 4 is a flowchart of the generation of a face model in a first embodiment of the present disclosure;
FIG. 5 is a flow chart illustrating a process of stitching between a face model and a recommended hair style according to a first embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device in a third embodiment of the present disclosure.
Detailed Description
Various aspects and features of the disclosure are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Other modifications will occur to those skilled in the art within the scope and spirit of the disclosure.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and, together with a general description of the disclosure given above, and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
These and other characteristics of the present disclosure will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present disclosure has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of the disclosure, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present disclosure will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the disclosure that may be embodied in various forms. Well-known and/or repeated functions and structures have not been described in detail so as not to obscure the present disclosure with unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present disclosure in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the disclosure.
Hairdressing is an essential service in daily life of most residents, but customer satisfaction in the hairdressing industry is generally low, and the main reasons are that hairdressers cannot fully understand the hairstyle preference and haircut requirements of customers, and the evaluation of the satisfaction is affected due to the fact that the hairdressers are inconsistent with the expectations of the customers due to large operation freedom.
With the development of computer technology, the user can conveniently preview the hair style by splicing the face video image of the user with the pre-stored hair style model at present, but the problems of hair style cutting and replacement exist in the process of splicing the video image with the three-dimensional hair style model, so that the splicing effect is poor, and the actual requirement cannot be met.
In order to solve the above problem, a first embodiment of the present disclosure provides a method for previewing a hairstyle, which can be implemented by any electronic device having a processing function and connected with a camera and a display device, and a flowchart thereof is shown in fig. 1, and mainly includes steps S1 to S5:
s1, acquiring the face image of the user and determining the personal information of the user according to the face information.
In this embodiment, the facial image of the user is mainly the facial image of the front of the user, which not only reflects the information of the five sense organs of the user, but also serves as the unique feature of the user and serves as the identity information of the user in the subsequent use process. When the system is in actual use, a user can pre-store own user basic information to a user database, for example, contents such as gender, age, occupation and the like, correspondingly store a face image on the front of the user, form a unique user ID in the user database and correspond to the stored contents to form a user portrait of the user, and correspondingly store expanded information contents such as the current geographic position, climate conditions, culture level and the like of the user to serve as a further basis for follow-up hair style recommendation.
Before the user arrives at a barber shop to prepare for hair style trimming, a barber can use the corresponding electronic device to obtain a front image of the user and then determine personal information corresponding to the user based on the face image of the user, and the personal information is used as a basis for subsequent hair style recommendation.
And S2, determining M recommended hairstyles based on the personal information and displaying the hairstyles.
The personal information of the user mainly includes a user ID and basic information of the user, i.e. the user's gender, age, occupation, etc., which all have an influence on the hairstyle that the user may prefer, for example: a user who is policeman in the profession may try to select a hairstyle which is not subjected to permanent dyeing, and teenagers may select a hairstyle similar to a star; further, the corresponding expansion information of the user may also have an influence on the preference of the hair style, for example, a user living in the north may prefer to have long hair in winter.
After the personal information of the user is obtained, the preference or the appropriate hair style of the user can be output through a recommendation algorithm according to the personal information. Specifically, fig. 2 shows a flowchart for determining a recommended hairstyle based on personal information, which mainly includes steps S21 to S23:
s21, determining N alternative hair styles in a hair style database through a recommendation algorithm according to the personal information;
s22, scoring the N optional hairstyles respectively;
and S23, taking the M alternative hair styles with the highest scores in the N alternative hair styles as the recommended hair style.
In this embodiment, hair style recommendation is performed through a recommendation algorithm, which may be a recommendation model established based on reinforcement learning DQN, and a schematic structural diagram of the recommendation model is shown in fig. 3, where the recommendation model mainly includes an environment and an agent, where the environment is a feedback mechanism including a user image (i.e., user personal information) and a hair style selection result thereof, and the agent is a recommendation decision-making mechanism, the agent makes a decision through information perception of the environment, i.e., performs hair style recommendation based on the user personal information to form N alternative hair styles, and the environment may perform feedback on all alternative hair styles output by the agent, and output M alternative hair styles with highest scores according to a score result to form a recommended hair style list. It should be noted that M and N are positive integers in this embodiment, and M is less than or equal to N.
Further, in the subsequent interaction process with the user, the scoring feedback of the environment and the recommendation decision mechanism of the agent can be improved and optimized based on the preference or selection condition of the user to the recommended hairstyle, so that the recommended hairstyle better conforms to the preference of the user, or the score of the hairstyle conforming to the preference of the user is improved in the scoring process; meanwhile, the personal information of the user may further include a previous hair style selection history of the user, and when the alternative hair style is scored, the alternative hair style may be scored based on the hair style selection history, for example, the alternative hair style which is the same as or similar to the hair style selection history may obtain more scores, so as to further ensure that the recommended hair style obtained based on the alternative hair style better conforms to the preference of the user.
After the M recommended hairstyles are generated, the M recommended hairstyles can be displayed to a user through a display device, the displayed main content comprises the numbers of the recommended hairstyles and a three-dimensional model of the recommended hairstyles, and the user can rotate, zoom and the like the recommended hairstyles on the display device through a control device or touch equipment so as to observe various angles of the recommended hairstyles.
It should be understood that the three-dimensional model of the recommended hairstyle is pre-established and pre-stored in the hairstyle database, and an administrator (for example, a barber) can perform operations such as importing, modifying, deleting and the like on the three-dimensional model of the hairstyle stored in the hairstyle database. For example, if three characteristics of the length, color, and curl degree of the hairstyle are selected, each of which is represented by 3 bits, a short hair with a length of less than 5cm is represented by (1,0,0), a red hair color is represented by (2,0,0), and a straight hair is represented by (0,0,0), a feature vector such as (1,0,0,2,0,0, 0) can be obtained, and a red straight hair with a length of less than 5cm can be represented, but the above-mentioned representation of the characteristics is only illustrative, and the administrator can actively adjust the characteristics based on the actual situation.
S3, a face model of the user is determined based on the personal information.
The face model of the user refers to a three-dimensional face model generated based on the reconstruction of a two-dimensional face image of the user, and in a general case, when the user uses the method provided by the embodiment for the first time, the three-dimensional face model can be established by shooting a multi-angle face image, the established face model is stored in a face model library, and the established face model is stored in association with information such as a user ID, personal information and a face image of the front face of the user corresponding to the user. In actual use, after a face image of a user is acquired, whether a face model corresponding to the face image exists in a face model library is detected, if the face model library exists, the corresponding face model is called directly and output, and if the face model library does not exist, the corresponding face model can be generated based on the face image of the user and stored in the face model library for subsequent application.
Fig. 4 shows a flow chart of face model generation, which mainly implements a process of reconstructing a three-dimensional face model using a two-dimensional face image through a PRNet network, which designs a texture (UV) position map for recording a two-dimensional image of three-dimensional coordinates of point clouds of all faces, and adopts an encoder-decoder structure to directly regress three-dimensional parameters of a face from a single two-dimensional face image, and output the UV position map, thereby obtaining a three-dimensional face model. The specific implementation steps are as follows:
s100, calling a camera to take a picture, and acquiring a front image of a user as the input of a face model; in addition, the side images of the user can be shot at the same time and are also used as the input of the face model so as to improve the final display effect of the face model;
s200, detecting key points of a human face, acquiring a human face frame, and cutting an input image according to the human face frame to obtain a facial image;
s300, loading PRNEt network weight, loading a network structure, inputting the cut face image into the PRNEt network, and predicting a UV position mapping chart;
s400, loading a vertex index file, and directly acquiring vertex information according to the file and the UV position mapping chart; in this embodiment, the three-dimensional model is actually an abstract mesh constructed based on triangles, the vertices are the vertices of each triangle, and the vertex information mainly refers to the spatial coordinates, normal vectors, colors, and other information of each vertex;
and S500, extracting texture information for coloring the vertex from the UV position mapping chart, obtaining a three-dimensional model of the face of the user based on the texture information and the vertex information, and storing the three-dimensional model for subsequent splicing with the hairstyle model.
It should be noted that, during actual use, the actual execution sequence of step S2 and step S3 may not be the order specified in the embodiment, and the above two steps may also be performed simultaneously, and this embodiment is not limited as long as outputting the corresponding face model and the recommended hairstyle can be realized.
And S4, sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results.
The model of facial model and recommendation hairstyle is three-dimensional model, can splice the processing to the model after acquireing facial model and recommendation hairstyle respectively to the two, make hairstyle model try to wear on facial model, can directly perceivedly show present effect of current user after pruning to corresponding hairstyle, and compare in splicing hairstyle model and user video image, splice the step of can simplifying the concatenation with splicing between the three-dimensional model, promote the concatenation effect, and be more convenient for the user to carry out all-round multi-angle's the looking over to the model after the concatenation.
Fig. 5 shows a flow chart of a process of splicing the face model and the recommended hair style, which mainly comprises the following steps:
s41, loading a face model and M models of recommended hairstyles; the face model and the hair style model are represented based on the vertex information and the matched texture information, and in the process of loading the models, matched textures and the vertex coordinates of the models can be attached based on the texture coordinates in the model files to form the complete hair style model and the complete face model.
S42, acquiring first key coordinate information of the face model and second key coordinate information of each recommended hairstyle model; the first key coordinate information refers to coordinate point information of each key position in the face model, such as head center coordinates, maximum value coordinates of the x axis, the y axis and the z axis of the head, and the like; the second key coordinate information is, similarly, the hair style center coordinate of each recommended hair style model, the maximum value coordinate of the hair style x axis, y axis, z axis, and the like.
S43, respectively splicing the face model and each recommended hairstyle model through a preset action based on the first key coordinate information and the second key coordinate information to obtain M splicing results; the preset action mainly refers to operations such as translation, rotation and scaling, the initial positioning between the models can be carried out according to the first key coordinate information and the second key coordinate information when the previewing method is used for splicing, and an administrator can also carry out fine adjustment according to actual requirements so as to achieve a better splicing effect.
S44, storing action sequences of preset actions executed in the process of splicing the face model and each recommended hairstyle model respectively; in this embodiment, regardless of the positioning performed automatically or the fine adjustment performed manually, the preset actions and the adjustment parameters that are correspondingly performed in the splicing process are all saved in the action sequence corresponding to the hair style model, so that the splicing effect of different hair styles and face models is solidified for being called at any time later.
S5, displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles.
After the M recommended hairstyles are determined, a user can check the specific condition of each recommended hairstyle through a display device, select at least one recommended hairstyle as a selection result, and at this time, a splicing result between a face model of the user and the hairstyle selected by the user needs to be correspondingly displayed for the user to check.
According to the embodiment, the personalized hairstyle is recommended for the user based on the facial image of the user, the recommended hairstyle is spliced with the facial three-dimensional model of the user, so that the splicing effect is improved, meanwhile, the hairstyle effect of each spliced angle can be checked through free operations such as rotation and zooming by the user or a hairdresser, the hairstyle requirement of the user can be more fully understood by the hairdresser, and the satisfaction degree of the user is further improved.
A first embodiment of the present disclosure provides a storage medium, which can be installed in any electronic device having a processing function and connected with a shooting device and a display device, and is specifically a computer-readable medium storing a computer program, when executed by a processor, the computer program implementing the method provided by any embodiment of the present disclosure, including the following steps S201 to S205:
s201, acquiring a face image of a user and determining personal information of the user according to the face information;
s202, determining and displaying M recommended hairstyles based on personal information, wherein M is a positive integer;
s203, determining a face model of the user according to the face image;
s204, sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results;
s205, displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles.
Specifically, the personal information includes at least a user ID, user basic information.
When the computer program is executed by the processor to determine the M recommended hair styles based on the personal information, the processor specifically executes the following steps: determining N alternative hair styles in a hair style database through a recommendation algorithm according to the personal information; respectively scoring the N alternative hairstyles; and taking M candidate hair styles with the highest scores in the N candidate hair styles as recommended hair styles, wherein N is a positive integer, and M is smaller than or equal to N.
When the computer program is executed by the processor to determine a face model of the user from the face image, the processor specifically executes the following steps: detecting whether a face model corresponding to a face image exists in a face model library or not; outputting a face model corresponding to the face image when the face model corresponding to the face image exists in the face model library; if a face model corresponding to the face image does not exist in the face model library, a face model corresponding to the face image is generated based on the face image and output.
When the computer program is executed by the processor to sequentially splice the face model and the M recommended hair styles, the processor specifically executes the following steps: loading a face model and M models of recommended hairstyles; acquiring first key coordinate information of the face model and second key coordinate information of each recommended hairstyle model; respectively splicing the face model and each recommended hairstyle model through a preset action based on the first key coordinate information and the second key coordinate information to obtain M splicing results; and storing the action sequence of the preset action executed in the process of splicing the face model and each recommended hairstyle model respectively.
When the computer program is executed by the processor based on the selection result of the user on the M recommended hair styles to show the first splicing result corresponding to the recommended hair style selected by the user, the processor specifically executes the following steps: forming a first splicing result based on an action sequence corresponding to the recommended hairstyle selected by the user; and displaying the first splicing result.
After the computer program is executed by the processor to show a first splicing result corresponding to the recommended hair style selected by the user based on the selection result of the user on the M recommended hair styles, the processor further executes the following steps: and optimizing a recommendation decision of a recommendation algorithm based on the feedback of the user to the first splicing result.
According to the embodiment, the personalized hairstyle is recommended for the user based on the facial image of the user, the recommended hairstyle is spliced with the facial three-dimensional model of the user, so that the splicing effect is improved, meanwhile, the hairstyle effect of each spliced angle can be checked through free operations such as rotation and zooming by the user or a hairdresser, the hairstyle requirement of the user can be more fully understood by the hairdresser, and the satisfaction degree of the user is further improved.
The third embodiment of the present disclosure provides an electronic device, which is connected with a shooting device and a display device, or has a shooting function and a display screen, and a schematic structural diagram of the electronic device is shown in fig. 6, and the electronic device at least includes a memory 100 and a processor 200, where the memory 100 stores a computer program, and the processor 200 implements the method provided in any embodiment of the present disclosure when executing the computer program on the memory 100. Illustratively, the electronic device computer program steps are as follows S301 to S305:
s301, acquiring a face image of a user and determining personal information of the user according to the face information;
s302, determining and displaying M recommended hairstyles based on personal information, wherein M is a positive integer;
s303, determining a face model of the user according to the face image;
s304, sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results;
s305, displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles.
Specifically, the personal information includes at least a user ID, user basic information.
When the processor executes the personal information-based determination M recommended hair styles stored in the memory, the following computer programs are specifically executed: determining N alternative hair styles in a hair style database through a recommendation algorithm according to the personal information; respectively scoring the N alternative hairstyles; and taking M candidate hair styles with the highest scores in the N candidate hair styles as recommended hair styles, wherein N is a positive integer, and M is smaller than or equal to N.
The processor, when executing the computer program stored on the memory for determining a face model of the user from the face image, specifically executes the computer program: detecting whether a face model corresponding to a face image exists in a face model library or not; outputting a face model corresponding to the face image when the face model corresponding to the face image exists in the face model library; if a face model corresponding to the face image does not exist in the face model library, a face model corresponding to the face image is generated based on the face image and output.
The processor, when sequentially stitching the face model and the M recommended hair styles stored in the execution memory to obtain M stitching results, specifically executes the following computer program: loading a face model and M models of recommended hairstyles; acquiring first key coordinate information of the face model and second key coordinate information of each recommended hairstyle model; respectively splicing the face model and each recommended hairstyle model through a preset action based on the first key coordinate information and the second key coordinate information to obtain M splicing results; and storing the action sequence of the preset action executed in the process of splicing the face model and each recommended hairstyle model respectively.
When the processor executes the first splicing result corresponding to the recommended hair style selected by the user based on the selection result of the user on the M recommended hair styles stored in the memory, the following computer program is specifically executed: forming a first splicing result based on an action sequence corresponding to the recommended hairstyle selected by the user; and displaying the first splicing result.
After the processor executes the first splicing result which is stored in the memory and corresponds to the recommended hair style selected by the user based on the selection result of the user on the M recommended hair styles, the following computer programs are also executed: and optimizing a recommendation decision of a recommendation algorithm based on the feedback of the user to the first splicing result.
According to the embodiment, the personalized hairstyle is recommended for the user based on the facial image of the user, the recommended hairstyle is spliced with the facial three-dimensional model of the user, so that the splicing effect is improved, meanwhile, the hairstyle effect of each spliced angle can be checked through free operations such as rotation and zooming by the user or a hairdresser, the hairstyle requirement of the user can be more fully understood by the hairdresser, and the satisfaction degree of the user is further improved.
While the present disclosure has been described in detail with reference to the embodiments, the present disclosure is not limited to the specific embodiments, and those skilled in the art can make various modifications and alterations based on the concept of the present disclosure, and the modifications and alterations should fall within the scope of the present disclosure as claimed.

Claims (10)

1. A method for previewing a hairstyle, comprising:
acquiring a face image of a user and determining personal information of the user according to the face information;
determining M recommended hairstyles based on the personal information and displaying the hairstyles, wherein M is a positive integer;
determining a face model of the user from the face image;
sequentially splicing the face model and the M recommended hairstyles to obtain M splicing results;
and displaying a first splicing result corresponding to the recommended hairstyle selected by the user based on the selection result of the user on the M recommended hairstyles.
2. The preview method according to claim 1, wherein the personal information includes at least a user ID, user basic information.
3. The preview method of claim 2, wherein the determining M recommended hair styles based on the personal information comprises:
determining N alternative hair styles in a hair style database through a recommendation algorithm according to the personal information;
respectively scoring the N alternative hairstyles;
and taking M candidate hair styles with the highest scores in the N candidate hair styles as the recommended hair style, wherein N is a positive integer, and M is smaller than or equal to N.
4. The preview method of claim 1, wherein the determining the face model of the user from the face image comprises:
detecting whether a face model corresponding to the face image exists in a face model library or not;
outputting a face model corresponding to the face image when the face model corresponding to the face image exists in the face model library;
and if the face model corresponding to the face image does not exist in the face model library, generating and outputting a face model corresponding to the face image based on the face image.
5. The previewing method according to claim 1, wherein the sequentially stitching the face model and the M recommended hairstyles to obtain M stitching results comprises:
loading the facial model and models of the M recommended hairstyles;
acquiring first key coordinate information of the face model and second key coordinate information of each recommended hairstyle model;
respectively splicing the face model and each recommended hairstyle model through a preset action based on the first key coordinate information and the second key coordinate information to obtain M splicing results;
and storing action sequences of preset actions executed in the process of splicing the face model and each recommended hairstyle model respectively.
6. The preview method according to claim 5, wherein the displaying a first splicing result corresponding to the recommended hair style selected by the user based on the selection result of the M recommended hair styles by the user comprises:
forming the first splicing result based on an action sequence corresponding to the recommended hairstyle selected by the user;
and displaying the first splicing result.
7. The preview method according to claim 2, wherein after the displaying the first splicing result corresponding to the recommended hair style selected by the user based on the selection result of the user for the M recommended hair styles, the method further comprises:
and optimizing the recommendation decision of the recommendation algorithm based on the feedback of the user to the first splicing result.
8. The preview method of claim 2, wherein the personal information further comprises: a hair style selection history for the user; the scoring the N candidate hair styles includes:
scoring the N candidate hair styles respectively based on the hair style selection history.
9. A storage medium storing a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps of a method for previewing a hair style according to any one of claims 1 to 8.
10. An electronic device comprising at least a memory, a processor, said memory having stored thereon a computer program, characterized in that said processor, when executing the computer program on said memory, is adapted to carry out the steps of a method for previewing a hair style according to any one of claims 1 to 8.
CN202110055032.1A 2021-01-15 2021-01-15 Hair style previewing method, storage medium and electronic equipment Pending CN112785500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110055032.1A CN112785500A (en) 2021-01-15 2021-01-15 Hair style previewing method, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110055032.1A CN112785500A (en) 2021-01-15 2021-01-15 Hair style previewing method, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112785500A true CN112785500A (en) 2021-05-11

Family

ID=75756123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110055032.1A Pending CN112785500A (en) 2021-01-15 2021-01-15 Hair style previewing method, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112785500A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011143158A (en) * 2010-01-18 2011-07-28 Spill:Kk Hair style selection system, hair style selection method, and recording medium with program stored for achieving the method
CN108090422A (en) * 2017-11-30 2018-05-29 深圳云天励飞技术有限公司 Hair style recommends method, Intelligent mirror and storage medium
CN108255998A (en) * 2017-12-29 2018-07-06 武汉璞华大数据技术有限公司 A kind of hair style recommends method, apparatus and equipment
CN108664569A (en) * 2018-04-24 2018-10-16 杭州数为科技有限公司 A kind of hair style recommends method, system, terminal and medium
CN108984772A (en) * 2018-07-23 2018-12-11 京东方科技集团股份有限公司 A kind of information recommending apparatus and method
KR101935495B1 (en) * 2017-11-01 2019-01-04 주식회사 피엠이엑스 Hair style method using artificial intelligence
CN110598097A (en) * 2019-08-30 2019-12-20 中国科学院自动化研究所南京人工智能芯片创新研究院 Hair style recommendation system, method, equipment and storage medium based on CNN
CN112015934A (en) * 2020-08-27 2020-12-01 华南理工大学 Intelligent hair style recommendation method, device and system based on neural network and Unity
US20210183166A1 (en) * 2018-11-30 2021-06-17 Tencent Technology (Shenzhen) Company Limited Parameter configuration method, apparatus, and device for three-dimensional face model, and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011143158A (en) * 2010-01-18 2011-07-28 Spill:Kk Hair style selection system, hair style selection method, and recording medium with program stored for achieving the method
KR101935495B1 (en) * 2017-11-01 2019-01-04 주식회사 피엠이엑스 Hair style method using artificial intelligence
CN108090422A (en) * 2017-11-30 2018-05-29 深圳云天励飞技术有限公司 Hair style recommends method, Intelligent mirror and storage medium
CN108255998A (en) * 2017-12-29 2018-07-06 武汉璞华大数据技术有限公司 A kind of hair style recommends method, apparatus and equipment
CN108664569A (en) * 2018-04-24 2018-10-16 杭州数为科技有限公司 A kind of hair style recommends method, system, terminal and medium
CN108984772A (en) * 2018-07-23 2018-12-11 京东方科技集团股份有限公司 A kind of information recommending apparatus and method
US20210183166A1 (en) * 2018-11-30 2021-06-17 Tencent Technology (Shenzhen) Company Limited Parameter configuration method, apparatus, and device for three-dimensional face model, and storage medium
CN110598097A (en) * 2019-08-30 2019-12-20 中国科学院自动化研究所南京人工智能芯片创新研究院 Hair style recommendation system, method, equipment and storage medium based on CNN
CN112015934A (en) * 2020-08-27 2020-12-01 华南理工大学 Intelligent hair style recommendation method, device and system based on neural network and Unity

Similar Documents

Publication Publication Date Title
US10535163B2 (en) Avatar digitization from a single image for real-time rendering
US6453052B1 (en) Automated method and image processing system for hair style simulation
JPWO2018221092A1 (en) Image processing apparatus, image processing system, image processing method, and program
WO2019050808A1 (en) Avatar digitization from a single image for real-time rendering
US10515456B2 (en) Synthesizing hair features in image content based on orientation data from user guidance
US20070052726A1 (en) Method and system for likeness reconstruction
US20220207807A1 (en) Modifying an appearance of hair
CN110322571B (en) Page processing method, device and medium
US20220284678A1 (en) Method and apparatus for processing face information and electronic device and storage medium
KR20130029482A (en) System, method and computer readable recording medium for simulating hair style
KR20190043925A (en) Method, system and non-transitory computer-readable recording medium for providing hair styling simulation service
KR20210058320A (en) Method for generation 3d model using single input image and apparatus using the same
KR20230025906A (en) Systems and methods for improved facial attribute classification and its use
WO2022257766A1 (en) Image processing method and apparatus, device, and medium
CN114904268A (en) Virtual image adjusting method and device, electronic equipment and storage medium
JP2002083318A (en) Image processing device, method, and storage medium
CN112785500A (en) Hair style previewing method, storage medium and electronic equipment
JPH0767721A (en) Hair dresser supporting device
CN112292709A (en) System and method for providing hair style recommendations
JP2024500224A (en) Method and apparatus for hair styling analysis
TWI728037B (en) Method and device for positioning key points of image
US20240177389A1 (en) Apparatus and method for creating avatar
JP7493532B2 (en) Changing the appearance of the hair
KR20110019159A (en) Hair styling demo system and method
KR101520863B1 (en) Method and terminal for automatically manufacturing charactor

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