CN117688235A - Hairstyle recommendation method, device and system - Google Patents

Hairstyle recommendation method, device and system Download PDF

Info

Publication number
CN117688235A
CN117688235A CN202311567844.XA CN202311567844A CN117688235A CN 117688235 A CN117688235 A CN 117688235A CN 202311567844 A CN202311567844 A CN 202311567844A CN 117688235 A CN117688235 A CN 117688235A
Authority
CN
China
Prior art keywords
hairstyle
head
hair
target
determining
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
CN202311567844.XA
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.)
Beijing SoundAI Technology Co Ltd
Original Assignee
Beijing SoundAI 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 Beijing SoundAI Technology Co Ltd filed Critical Beijing SoundAI Technology Co Ltd
Priority to CN202311567844.XA priority Critical patent/CN117688235A/en
Publication of CN117688235A publication Critical patent/CN117688235A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a hairstyle recommending method, device and system, and relates to the technical field of artificial intelligence, wherein the method comprises the following steps: acquiring a head acquisition image set corresponding to a target user; inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user; based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined; and determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape. The invention can realize hairstyle recommendation and reduce the hairstyle selection cost.

Description

Hairstyle recommendation method, device and system
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a hairstyle recommending method, device and system.
Background
In the current society, a few people suffer from alopecia, and most people adopt schemes of hair implantation, wig and the like to solve the overhead problem. The selection of hairstyle is extremely important in selecting hair setting, wig, etc. While the user often needs to select a hairstyle several times, which costs high economic costs, an unsatisfactory hairstyle consumes a long time cost, for example, a time cost spent purchasing a wig, a growing time cost from transplanting hair follicles to growing new hair after hair implantation, resulting in a high cost of hairstyle selection.
Disclosure of Invention
The invention provides a hairstyle recommending method, device and system, which are used for solving the defect of high hairstyle selecting cost in the prior art, realizing hairstyle recommending and reducing the hairstyle selecting cost.
The invention provides a hairstyle recommending method, which comprises the following steps:
acquiring a head acquisition image set corresponding to a target user;
inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user;
based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined;
and determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
According to the hairstyle recommendation method provided by the invention, the head collection image set is input into a feature extraction model, and the head feature corresponding to the target user is determined, which comprises the following steps:
inputting the head acquired image set into a key point detection model in the feature extraction model, and determining 3D point cloud data of a plurality of head key points;
performing edge detection based on the 3D point cloud data, and determining head outline data and hairline position data of the target user;
and determining the head characteristics corresponding to the target user based on the 3D point cloud data, the head outline data and the hairline position data.
According to the hairstyle recommendation method provided by the invention, the determining the head feature corresponding to the target user based on the 3D point cloud data, the head contour data and the hairline position data comprises the following steps:
determining a 3D head size, a 3D head scale, a head shape, and a face shape of the target user based on the 3D point cloud data and the head profile data;
determining a forehead width and a forehead height based on the 3D point cloud data and the hairline position data;
and determining the head characteristics corresponding to the target user based on the 3D head size, the 3D head proportion, the head shape, the face shape, the forehead width, the forehead height and the hairline position data of the target user.
According to the hair style recommendation method provided by the invention, the step of inputting the head collection image set into a feature extraction model to determine the hair style feature corresponding to the target user comprises the following steps:
inputting the head collection image set into a target detection model in the feature extraction model to determine at least one hair collection image containing hair;
inputting at least one hair acquisition image into a segmentation detection model in the feature extraction model to determine a hair image and a hair loss image;
based on the hair image, determining corresponding hair quality and curling data of the hair image, wherein the curling data comprises the curling quantity, the curling position and the curling degree of original hair of the target user;
determining the hair follicle density and the hair follicle direction corresponding to the hair loss image based on the hair loss image;
based on the hair mass, the curl data, the hair follicle density, and the hair follicle direction, a hair style characteristic corresponding to the target user is determined.
According to the hair style recommendation method provided by the invention, the matching is performed from a preset hair style library based on the head characteristics, and the target hair style shape is determined, which comprises the following steps:
matching the head characteristics with preset head characteristics corresponding to all hairstyles in the hairstyle library respectively, and determining a first matching degree;
and determining the overall shape of the hairstyle corresponding to the highest first matching degree as a target hairstyle shape.
According to the hair style recommendation method provided by the invention, the determining the target recommended hair style corresponding to the target user based on the hair style characteristics and the target hair style shape comprises the following steps:
determining a plurality of first recommended hairstyles corresponding to the target hairstyle shape in the hairstyle library;
matching the hairstyle characteristics with preset hairstyle characteristics corresponding to the plurality of first recommended hairstyles, and determining a second matching degree;
and determining a preset number of target recommended hairstyles according to the sequence of the second matching degree from high to low.
According to the hairstyle recommendation method provided by the invention, the method further comprises the following steps:
performing three-dimensional modeling based on the head features to generate a head three-dimensional model;
generating a hairstyle three-dimensional model based on the target recommended hairstyle;
generating a hairstyle simulation model based on the head three-dimensional model and the hairstyle three-dimensional model;
transmitting the hairstyle simulation model to a display for display;
and responding to the instruction of the target user, and performing relevant operation on the hairstyle simulation model or the hairstyle characteristics.
The invention also provides a hairstyle recommending device, which comprises:
the acquisition module is used for acquiring a head acquisition image set corresponding to the target user;
the output module is used for inputting the head collection image set into a feature extraction model and outputting head features and hairstyle features corresponding to the target user;
the first determining model is used for matching from a preset hairstyle library based on the head characteristics to determine a target hairstyle shape;
and the second determining model is used for determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
The invention also provides a hairstyle recommendation system, which comprises an imaging component, a display, a processor and a computer program which is stored on the memory and can run on the processor, wherein the imaging component is used for acquiring a head acquisition image set corresponding to a target user;
the display is used for displaying the hairstyle simulation model;
the processor, when executing the program, implements a hair style recommendation method as described in any one of the above.
According to the hair style recommendation method system provided by the invention, the imaging assembly comprises: camera, lens and lighting device, wherein:
the lens is used for controlling the light direction;
the lighting device is used for controlling the light intensity;
the camera is connected with the processor and is used for acquiring a head acquisition image set corresponding to the target user based on the light imaging.
According to the hair style recommending method, device and system, the head characteristic and the hair style characteristic corresponding to the target user are comprehensively extracted from the head acquired image set through the characteristic extraction model, the target hair style shape is determined from the hair style library according to the head characteristic, the hair style parameter corresponding to the target hair style shape is subjected to detail adjustment according to the hair style characteristic, the target recommended hair style corresponding to the target user is determined, the matching degree of the target recommended hair style and the target user is ensured from the whole shape and the hair style detail, personalized hair style recommending is realized, and the hair style selecting cost and the trial-and-error cost are reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a hair style selection method according to an embodiment of the present invention;
fig. 2 is a schematic view of a hair style selection device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a hairstyle recommendation system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Aiming at the problem of higher cost of hair style selection in the prior art, an embodiment of the present invention provides a hair style recommendation method, and fig. 1 is a schematic flow chart of the hair style selection method provided by the embodiment of the present invention, as shown in fig. 1, where the method includes:
step 110, acquiring a head acquisition image set corresponding to the target user.
And 120, inputting the head collection image set into a feature extraction model, and outputting the head features and the hair style features corresponding to the target user.
And 130, based on the head characteristics, matching from a preset hairstyle library to determine a target hairstyle shape.
And 140, determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
Specifically, the imaging component can shoot the head of the target user at multiple angles and multiple views to obtain multiple head acquisition images, and a head acquisition image set is constructed. After the head collection image set is input into the feature extraction model, feature extraction can be carried out on the head collection image set, and head features and hair style features of a target user are obtained. The preset head characteristics of each hairstyle in the preset hairstyle library are matched through the head characteristics, the target hairstyle shape matched with the head of the target user is determined on the whole, the target hairstyle shape is used for being mutually coordinated with the shape of the head so as to highlight or balance the head characteristics and create attractive and harmonious overall effects, and the hairstyle can comprise the outline, the volume, the distribution and the like of the hairstyle, for example, if the shape in the head characteristics is round, the soft streamline shape or the long wave curling shape is more suitable to be selected, and the target hairstyle shape corresponds to the round head shape mutually, so that the soft and balanced overall effects are created. For another example, if the shape of the head feature is square, the hair style with layering and flowing sense is more suitable, for example, short hair with fluffy layering or natural hair curling can be achieved, and the target hair style shape can create soft and dynamic contrast on square lines of the head, so that the overall shape is more layering and smooth. After the target hair style shape is determined, further performing detail adjustment from a preset hair style corresponding to the target hair style shape in the hair style library according to the hair style characteristics, so as to determine a target recommended hair style suitable for the target user from the whole and the part, thereby saving the times and time cost of selecting the hair style by the target user and further reducing the economic cost.
Optionally, the collecting the image set by the head may include: face image, overhead image, side face image, pitch angle image, yaw angle image and depth image, wherein:
the face image may be used to capture facial features of the target user, including facial contours, eyes, nose, mouth, and other key points. The overhead image can be obtained by shooting the top of the head of the target user through a overlooking angle so as to obtain information such as the shape of the overhead, hairline, hair distribution, head circumference and the like. The side face image may be an image taken from a side angle for providing a side profile of the target user's head, including key points of the ear, mandible, etc. The pitch angle images can be shot from different pitch angles and are used for providing up-down posture information of the head of the target user. The yaw angle images may be taken from different yaw angles and may provide left and right pose information of the target user's head. The roll angle images may be taken from different roll angles for providing rotational pose information of the target user's head. Each pixel value in the depth image represents a distance or depth from the camera to a respective keypoint in the target user's head.
Alternatively, the image in the head collection image set may be an RGB image, or a gray-scale image, which may be obtained by performing gray-scale processing on the RGB image.
Optionally, after the head acquired image set is obtained, a preprocessing operation may be performed on each image in the head acquired image set, where the preprocessing operation may include:
denoising an image: noise in the image is reduced by adopting a denoising algorithm (such as a Gaussian filter and a median filter), and the image quality is improved.
Image clipping: the head acquired image may be cropped as needed to remove unwanted areas or to adjust the image to a particular size.
Image scaling: scaling the head acquired image to adapt it to specific input requirements or input dimensions of the model.
Image rotation and flipping: the head acquired image can be rotated, horizontally flipped or vertically flipped, etc., as needed to change the direction or viewing angle of the image.
Color adjustment: the head acquired image can be adjusted in terms of brightness, contrast, saturation, hue and the like to enhance the visual effect of the image or adapt to specific algorithm requirements.
Data enhancement: additional training samples are generated by applying data enhancement techniques (such as random clipping, rotation, translation, scaling, brightness adjustment, etc.), so that the diversity of data is increased and the generalization capability of the model is improved.
Normalization: the pixel values of the head acquired image are normalized to a specific range, for example scaling the pixel values to between 0 and 1, or normalization by subtracting the mean sum divided by the standard deviation.
Optionally, inputting the head acquired image set into a feature extraction model to determine a head feature corresponding to the target user, including:
inputting the head acquired image set into a key point detection model in the feature extraction model, and determining 3D point cloud data of a plurality of head key points;
performing edge detection based on the 3D point cloud data, and determining head outline data and hairline position data of the target user;
and determining the head characteristics corresponding to the target user based on the 3D point cloud data, the head outline data and the hairline position data.
Specifically, the feature extraction model may include a key point detection model, where the key point detection model may be a 3D point cloud processing network based on deep learning, such as PointNet, pointNet ++ or PointCNN, and according to a pixel value in a depth image, map each pixel to a key point in a 3D space, assign each key point corresponding 3D coordinate information, and match the 3D coordinate information with the same key point in other head acquisition images, so as to obtain 3D point cloud data of the head of the whole target user. And performing edge detection on the 3D point cloud data to determine head outline data, detecting the edges of the hair area and the forehead area in the 3D point cloud data to obtain hairline position data of the target user, and determining hairline shape of the target user after determining the hairline position data of the target user.
Optionally, the determining, based on the 3D point cloud data, the head profile data, and the hairline position data, a head feature corresponding to the target user includes:
determining a 3D head size, a 3D head scale, a head shape, and a face shape of the target user based on the 3D point cloud data and the head profile data;
determining a forehead width and a forehead height based on the 3D point cloud data and the hairline position data;
and determining the head characteristics corresponding to the target user based on the 3D head size, the 3D head proportion, the head shape, the face shape, the forehead width, the forehead height and the hairline position data of the target user.
Specifically, after the 3D point cloud data and the hairline position data are determined, target detection can be performed through the 3D point cloud data, point cloud data corresponding to eyebrows are obtained through detection, and based on the point cloud data corresponding to the eyebrows and the hairline position data, a forehead area can be determined, and then a forehead width and a forehead height are determined. From the 3D point cloud data and the head profile data, a 3D head size, a 3D head scale, a head shape, and a face shape can be further determined. Wherein the head shape may affect the adaptability and overall appearance of the hairstyle, different head shapes may require different types of hairstyles for optimal results. The face (e.g., circle, square, melon seed face, etc.), hairline position, forehead width, forehead height, and head ratio may determine which hairstyle will be more prominent or balance facial features. Users of different facial shapes require different types of hairstyles to modify facial contours and proportions.
Optionally, the inputting the head acquired image set into a feature extraction model to determine the hairstyle feature corresponding to the target user includes:
inputting the head collection image set into a target detection model in the feature extraction model to determine at least one hair collection image containing hair;
inputting at least one hair acquisition image into a segmentation detection model in the feature extraction model to determine a hair image and a hair loss image;
based on the hair image, determining corresponding hair quality and curling data of the hair image, wherein the curling data comprises the curling quantity, the curling position and the curling degree of original hair of the target user;
determining the hair follicle density and the hair follicle direction corresponding to the hair loss image based on the hair loss image;
based on the hair mass, the curl data, the hair follicle density, and the hair follicle direction, a hair style characteristic corresponding to the target user is determined.
Specifically, the head acquisition image set is input into a target detection model in the feature extraction model, and the target detection model can use a pre-trained deep learning model, such as Faster R-CNN or YOLO, to perform target detection on a hair area, so as to obtain at least one hair acquisition image containing hair. At least one hair acquisition image containing hair is input into a segmentation detection model, which may include U-Net or deep Lab, and the hair image is subjected to segmentation detection to obtain a hair image and a hair loss image. For example, a hair image and a hair loss image can be obtained by pixel value matching. The hair loss image may then be processed using image processing and analysis techniques, such as Hough transform or a histogram of directional gradients (Histogram of Oriented Gradient, HOG), to obtain the hair follicle direction and number of hair follicles, and the hair follicle density may be further determined based on the number of hair follicles and the spacing between adjacent hair follicles. The texture feature extraction can be performed on the hair image, the diameter and glossiness of the hair root can be obtained, the hair quality of a target user can be determined, the hair image is processed by morphological operations such as corrosion, expansion and the like, and the curling data of the hair can be obtained.
In the above-mentioned characteristics of the hairstyle, the hair quality may affect the overall appearance and feel of the hairstyle. For example, a stiff hair mass is suitable for some strong, textured hair styles, while a soft hair mass is suitable for soft, elegant hair styles. Curl data can affect the shape, style, and volume of a hairstyle. For example, curling hair can increase the fluffiness and feel of a hairstyle, while straightening hair can more easily create a concise and attractive hairstyle. Hair follicle density can affect the thickening and fullness of the hair style. Higher hair follicle densities can produce a thicker, fluffy hairstyle, while lower hair follicle densities can present a sparse or thin hairstyle. The hair follicle orientation can affect the overall shape and styling of the hair style. For example, an upwardly inclined hair follicle direction may produce a more upright, vertical hair style, while a sideways inclined hair follicle direction may exhibit a smooth, laterally distributed hair style.
Optionally, the matching is performed from a preset hairstyle library based on the head characteristics, and the determining the target hairstyle shape includes:
matching the head characteristics with preset head characteristics corresponding to all hairstyles in the hairstyle library respectively, and determining a first matching degree;
and determining the overall shape of the hairstyle corresponding to the highest first matching degree as a target hairstyle shape.
Specifically, a plurality of preset hairstyles are stored in the hairstyle library, and the preset hairstyles correspond to preset head characteristics, preset hairstyle characteristics and corresponding 3D models. And determining the similarity between the head characteristics and preset head characteristics of various hairstyles in the hairstyle library, determining the similarity as a first matching degree, determining the overall shape of the hairstyle corresponding to the preset hairstyle with the highest first matching degree, determining the overall shape of the hairstyle to be a target hairstyle shape, and ensuring the maximum matching with the head characteristics of a target user from the overall hairstyle shape.
Alternatively, the similarity may be a euclidean distance (Euclidean Distance), i.e. a straight line distance between two feature vectors. The smaller the euclidean distance, the more similar the feature vectors are. Also Manhattan distance (Manhattan Distance), i.e. the sum of absolute differences between two eigenvectors, is possible. The smaller the manhattan distance, the more similar the feature vectors are. It may also be a correlation coefficient (Correlation Coefficient), i.e. a linear correlation between two eigenvectors. The larger the correlation coefficient, the more similar the feature vector.
Optionally, the determining, based on the hairstyle feature and the target hairstyle shape, a target recommended hairstyle corresponding to the target user includes:
determining a plurality of first recommended hairstyles corresponding to the target hairstyle shape in the hairstyle library;
matching the hairstyle characteristics with preset hairstyle characteristics corresponding to the plurality of first recommended hairstyles, and determining a second matching degree;
and determining a preset number of target recommended hairstyles according to the sequence of the second matching degree from high to low.
Specifically, after the target hair style shape is determined, a plurality of first recommended hair styles corresponding to the target hair style shape may be determined from a hair style library. And matching the preset hairstyle characteristics of each first recommended hairstyle with the hairstyle characteristics of the target user, determining a second matching degree, and determining a preset number of target recommended hairstyles for the target user according to the sequence of the second matching degree from high to low.
It should be noted that the second matching degree may be calculated based on the similarity calculation method, which is not described herein.
Optionally, the method further comprises:
performing three-dimensional modeling based on the head features to generate a head three-dimensional model;
generating a hairstyle three-dimensional model based on the target recommended hairstyle;
generating a hairstyle simulation model based on the head three-dimensional model and the hairstyle three-dimensional model;
transmitting the hairstyle simulation model to a display for display;
and responding to the instruction of the target user, and performing relevant operation on the hairstyle simulation model or the hairstyle characteristics.
Specifically, after determining the target recommended hairstyle, 3D modeling can be performed according to the target recommended hairstyle to obtain a hairstyle three-dimensional model, wherein the hairstyle three-dimensional model can be obtained by re-modeling based on hairstyle characteristics or can be obtained by modifying the hairstyle three-dimensional model on the basis of similar preset hairstyles in a hairstyle library. And carrying out three-dimensional modeling according to the head characteristics to generate a head three-dimensional model, wherein the generation of the two models can be simultaneous modeling, or carrying out three-dimensional modeling of the head three-dimensional model immediately after the head characteristics are determined, and then determining the hairstyle three-dimensional model after the target recommended hairstyle is determined. And splicing the head three-dimensional model and the hairstyle three-dimensional model to obtain a hairstyle simulation model, and displaying a modeling effect for a target user through a display. After the modeling effect is displayed, the target user can display the overall effect by rotating the hairstyle simulation model according to own preference, and can display the effect of the target recommendation model in motion by dragging the hairstyle simulation model. The target recommendation model can be switched through any one of clicking, dragging, left sliding or right sliding and the like to display the effects of different hairstyles, so that the target user can conveniently compare and select the hairstyles, the selection time cost of the user and the growth time cost of hair follicle growth of the hair planting user can be saved through a modeling mode, the user can select the optimal hairstyle from the modeled different target recommendation hairstyles, purchase the hairpiece of the hairstyle or perform hair planting according to the characteristics corresponding to the hairstyle, and a large amount of economic cost is saved.
In addition, in the embodiment of the invention, the hairline position data in the head characteristic and the setting parameters corresponding to the hairstyle characteristic can be displayed in an interface, and the target user can modify the details of the target recommended hairstyle by adjusting the corresponding setting parameters. The skin color, pupil color and the like of the target user can be determined, the color of the target recommended hairstyle is further determined, and the target user can switch the color of the target recommended hairstyle according to preference.
According to the hairstyle recommendation method provided by the embodiment of the invention, the head collection image set corresponding to the target user is obtained, the head characteristics and the hairstyle characteristics corresponding to the target user are comprehensively extracted from the head collection image set through the characteristic extraction model, the target hairstyle shape is determined from the hairstyle library according to the head characteristics, the hairstyle parameters corresponding to the target hairstyle shape are subjected to detail adjustment according to the hairstyle characteristics, the target recommendation hairstyle corresponding to the target user is determined, the matching degree of the target recommendation hairstyle and the target user is ensured from the overall shape and the hairstyle details, personalized hairstyle recommendation is realized, and the hairstyle selection cost and the trial-and-error cost are reduced.
An embodiment of the present invention provides a hair style recommendation device, fig. 2 is a schematic structural diagram of a hair style selection device provided in the embodiment of the present invention, and as shown in fig. 2, the hair style recommendation device 200 includes: an acquisition module 210, an output module 220, a first determination module 230, and a second determination module 240, wherein:
an acquiring module 210, configured to acquire a head acquired image set corresponding to a target user;
the output module 220 is configured to input the head acquired image set into a feature extraction model, and output a head feature and a hairstyle feature corresponding to the target user;
a first determining module 230, configured to determine a target hair style shape by matching from a preset hair style library based on the head feature;
and a second determining module 240, configured to determine a target recommended hairstyle corresponding to the target user based on the hairstyle feature and the target hairstyle shape.
According to the hair style recommendation device provided by the invention, the head characteristic and the hair style characteristic corresponding to the target user are comprehensively extracted from the head acquired image set through the characteristic extraction model, the target hair style shape is determined from the hair style library according to the head characteristic, the hair style parameter corresponding to the target hair style shape is subjected to detail adjustment according to the hair style characteristic, the target recommended hair style corresponding to the target user is determined, the matching degree of the target recommended hair style and the target user is ensured from the whole shape and the hair style detail, personalized hair style recommendation is realized, and the hair style selection cost and the trial-and-error cost are reduced.
Optionally, the output module 220 is specifically configured to:
inputting the head acquired image set into a key point detection model in the feature extraction model, and determining 3D point cloud data of a plurality of head key points;
performing edge detection based on the 3D point cloud data, and determining head outline data and hairline position data of the target user;
and determining the head characteristics corresponding to the target user based on the 3D point cloud data, the head outline data and the hairline position data.
Optionally, the output module 220 is specifically configured to:
determining a 3D head size, a 3D head scale, a head shape, and a face shape of the target user based on the 3D point cloud data and the head profile data;
determining a forehead width and a forehead height based on the 3D point cloud data and the hairline position data;
and determining the head characteristics corresponding to the target user based on the 3D head size, the 3D head proportion, the head shape, the face shape, the forehead width, the forehead height and the hairline position data of the target user.
Optionally, the output module 220 is specifically configured to:
inputting the head collection image set into a target detection model in the feature extraction model to determine at least one hair collection image containing hair;
inputting at least one hair acquisition image into a segmentation detection model in the feature extraction model to determine a hair image and a hair loss image;
based on the hair image, determining corresponding hair quality and curling data of the hair image, wherein the curling data comprises the curling quantity, the curling position and the curling degree of original hair of the target user;
determining the hair follicle density and the hair follicle direction corresponding to the hair loss image based on the hair loss image;
based on the hair mass, the curl data, the hair follicle density, and the hair follicle direction, a hair style characteristic corresponding to the target user is determined.
Optionally, the first determining module 230 is specifically configured to:
matching the head characteristics with preset head characteristics corresponding to all hairstyles in the hairstyle library respectively, and determining a first matching degree;
and determining the overall shape of the hairstyle corresponding to the highest first matching degree as a target hairstyle shape.
Optionally, the second determining module 240 is specifically configured to:
determining a plurality of first recommended hairstyles corresponding to the target hairstyle shape in the hairstyle library;
matching the hairstyle characteristics with preset hairstyle characteristics corresponding to the plurality of first recommended hairstyles, and determining a second matching degree;
and determining a preset number of target recommended hairstyles according to the sequence of the second matching degree from high to low.
Optionally, the hairstyle recommendation device further comprises: the display module is specifically used for:
performing three-dimensional modeling based on the head features to generate a head three-dimensional model;
generating a hairstyle three-dimensional model based on the target recommended hairstyle;
generating a hairstyle simulation model based on the head three-dimensional model and the hairstyle three-dimensional model;
transmitting the hairstyle simulation model to a display for display;
and responding to the instruction of the target user, and performing relevant operation on the hairstyle simulation model or the hairstyle characteristics.
The embodiment of the invention also provides a hairstyle recommendation system, fig. 3 is a schematic structural diagram of the hairstyle recommendation system provided by the embodiment of the invention, and as shown in fig. 3, the hairstyle recommendation system comprises: processor 310, communication interface (Communications Interface) 320, memory 330, communication bus 340, imaging assembly 350, and display 360, wherein processor 310, communication interface 320, memory 330 complete communication with each other via communication bus 340. The processor 310 may call logic instructions in the memory 330 to perform the hairstyle recommendation method described above, which includes:
acquiring a head acquisition image set corresponding to a target user;
inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user;
based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined;
determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape;
the imaging component 350 is connected to the processor 310, and is configured to collect a head collected image set corresponding to the target user;
the display 360 is coupled to the processor 310 for displaying the hairstyle simulation model.
Optionally, the imaging assembly 350 includes: camera, lens and lighting device, wherein:
the lens is used for controlling the light direction;
the lighting device is used for controlling the light intensity;
the camera is used for acquiring a head acquisition image set corresponding to the target user based on the light imaging.
The camera may be a high-resolution camera, and the specific resolution may be selected according to actual requirements, which is not limited in the embodiment of the present invention.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the hair style recommendation method provided by the above methods, the method comprising:
acquiring a head acquisition image set corresponding to a target user;
inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user;
based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined;
and determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the hairstyle recommendation method provided by the above methods, the method comprising:
acquiring a head acquisition image set corresponding to a target user;
inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user;
based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined;
and determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A hair style recommendation method, comprising:
acquiring a head acquisition image set corresponding to a target user;
inputting the head collection image set into a feature extraction model, and outputting head features and hairstyle features corresponding to the target user;
based on the head characteristics, matching is carried out from a preset hairstyle library, and a target hairstyle shape is determined;
and determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
2. The hair style recommendation method according to claim 1, wherein inputting the set of head-collected images into a feature extraction model and outputting the head features corresponding to the target user comprises:
inputting the head acquired image set into a key point detection model in the feature extraction model, and determining 3D point cloud data of a plurality of head key points;
performing edge detection based on the 3D point cloud data, and determining head outline data and hairline position data of the target user;
and determining the head characteristics corresponding to the target user based on the 3D point cloud data, the head outline data and the hairline position data.
3. The hairstyle recommendation method of claim 2, wherein the determining the head feature corresponding to the target user based on the 3D point cloud data, the head profile data and the hairline position data comprises:
determining a 3D head size, a 3D head scale, a head shape, and a face shape of the target user based on the 3D point cloud data and the head profile data;
determining a forehead width and a forehead height based on the 3D point cloud data and the hairline position data;
and determining the head characteristics corresponding to the target user based on the 3D head size, the 3D head proportion, the head shape, the face shape, the forehead width, the forehead height and the hairline position data of the target user.
4. A hair style recommendation method according to any one of claims 1-3, wherein said inputting said set of head captured images into a feature extraction model, determining a hair style feature corresponding to said target user, comprises:
inputting the head collection image set into a target detection model in the feature extraction model to determine at least one hair collection image containing hair;
inputting at least one hair acquisition image into a segmentation detection model in the feature extraction model to determine a hair image and a hair loss image;
based on the hair image, determining corresponding hair quality and curling data of the hair image, wherein the curling data comprises the curling quantity, the curling position and the curling degree of original hair of the target user;
determining the hair follicle density and the hair follicle direction corresponding to the hair loss image based on the hair loss image;
based on the hair mass, the curl data, the hair follicle density, and the hair follicle direction, a hair style characteristic corresponding to the target user is determined.
5. A hair style recommendation method according to any of claims 1-3, wherein said matching from a pre-set hair style library based on said head characteristics, determining a target hair style shape, comprises:
matching the head characteristics with preset head characteristics corresponding to all hairstyles in the hairstyle library respectively, and determining a first matching degree;
and determining the overall shape of the hairstyle corresponding to the highest first matching degree as a target hairstyle shape.
6. The hair style recommendation method of claim 5, wherein the determining a target recommended hair style corresponding to the target user based on the hair style characteristics and the target hair style shape comprises:
determining a plurality of first recommended hairstyles corresponding to the target hairstyle shape in the hairstyle library;
matching the hairstyle characteristics with preset hairstyle characteristics corresponding to the plurality of first recommended hairstyles, and determining a second matching degree;
and determining a preset number of target recommended hairstyles according to the sequence of the second matching degree from high to low.
7. The hair style recommendation method of claim 6, further comprising:
performing three-dimensional modeling based on the head features to generate a head three-dimensional model;
generating a hairstyle three-dimensional model based on the target recommended hairstyle;
generating a hairstyle simulation model based on the head three-dimensional model and the hairstyle three-dimensional model;
transmitting the hairstyle simulation model to a display for display;
and responding to the instruction of the target user, and performing relevant operation on the hairstyle simulation model or the hairstyle characteristics.
8. A hair style recommendation device, comprising:
the acquisition module is used for acquiring a head acquisition image set corresponding to the target user;
the output module is used for inputting the head collection image set into a feature extraction model and outputting head features and hairstyle features corresponding to the target user;
the first determining model is used for matching from a preset hairstyle library based on the head characteristics to determine a target hairstyle shape;
and the second determining model is used for determining a target recommended hairstyle corresponding to the target user based on the hairstyle characteristics and the target hairstyle shape.
9. A hair style recommendation system comprising an imaging assembly, a display, a processor, and a computer program stored on said memory and executable on said processor, characterized in that,
the imaging component is connected with the processor and is used for collecting a head collection image set corresponding to the target user;
the display is connected with the processor and used for displaying the hairstyle simulation model;
the processor, when executing the program, implements a hair style recommendation method as claimed in any one of claims 1 to 7.
10. The hair style recommendation system of claim 9 wherein said imaging assembly comprises: camera, lens and lighting device, wherein:
the lens is used for controlling the light direction;
the lighting device is used for controlling the light intensity;
the camera is connected with the processor and is used for acquiring a head acquisition image set corresponding to the target user based on the light imaging.
CN202311567844.XA 2023-11-22 2023-11-22 Hairstyle recommendation method, device and system Pending CN117688235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311567844.XA CN117688235A (en) 2023-11-22 2023-11-22 Hairstyle recommendation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311567844.XA CN117688235A (en) 2023-11-22 2023-11-22 Hairstyle recommendation method, device and system

Publications (1)

Publication Number Publication Date
CN117688235A true CN117688235A (en) 2024-03-12

Family

ID=90136260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311567844.XA Pending CN117688235A (en) 2023-11-22 2023-11-22 Hairstyle recommendation method, device and system

Country Status (1)

Country Link
CN (1) CN117688235A (en)

Similar Documents

Publication Publication Date Title
Song et al. Geometry-aware face completion and editing
CN109690617B (en) System and method for digital cosmetic mirror
US20220122308A1 (en) Techniques for smooth region merging in image editing
WO2022095721A1 (en) Parameter estimation model training method and apparatus, and device and storage medium
CN105118082B (en) Individualized video generation method and system
JP2020526809A (en) Virtual face makeup removal, fast face detection and landmark tracking
CN112419487B (en) Three-dimensional hair reconstruction method, device, electronic equipment and storage medium
US20140160123A1 (en) Generation of a three-dimensional representation of a user
CN109671016B (en) face model generation method and device, storage medium and terminal
CN109859305A (en) Three-dimensional face modeling, recognition methods and device based on multi-angle two-dimension human face
US10512321B2 (en) Methods, systems and instruments for creating partial model of a head for use in hair transplantation
CN108460398B (en) Image processing method and device and cloud processing equipment
CN105913416A (en) Method for automatically segmenting three-dimensional human face model area
US11282257B2 (en) Pose selection and animation of characters using video data and training techniques
US20190295272A1 (en) Synthesizing hair features in image content based on orientation data from user guidance
KR101948040B1 (en) Makeup recommendation method based on face type, and recording medium storing program for executing the same, and recording medium storing program for executing the same
KR20230085931A (en) Method and system for extracting color from face images
CN113344837B (en) Face image processing method and device, computer readable storage medium and terminal
CN113808277B (en) Image processing method and related device
KR20230110787A (en) Methods and systems for forming personalized 3D head and face models
KR20230060726A (en) Method for providing face synthesis service and apparatus for same
CN112508777A (en) Beautifying method, electronic equipment and storage medium
CN117688235A (en) Hairstyle recommendation method, device and system
CN116311474A (en) Face image face filling method, system and storage medium
CN113269822B (en) Person hair style portrait reconstruction method and system for 3D printing

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