Hair style simulation method based on image recognition
Through the hair style simulation method based on image recognition, a three-dimensional hair picture is generated based on the user's hair quality information, simulate the curly process, and dynamically adjust the curly parameters, solving the problem of poor curly effect in the existing technology, and achieving accurate personalized hairstyle simulation and efficient curly effect.
Patent Information
- Application Number
- CN202510361367.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
In the prior art, curly hair styles are affected by hair quality, and the operating parameters of curly hair operations cannot be determined and adjusted according to different hair quality of users, resulting in poor curly hair effect.
Using a hair style simulation method based on image recognition, the user's original hair image is obtained, the hair quality information is determined, and a three-dimensional hair picture is generated based on this information, the curl process is simulated, and the curl parameters are dynamically adjusted, such as the curl temperature, time and gap until the target hairstyle is approached.
It realizes accurate simulation of personalized hairstyles based on the user's hair quality information, dynamically adjusts curly hair parameters through fine matching of multiple angles and multiple parameters, maximizes the target hairstyle, and improves curly hair efficiency and effect.
Smart Images

Figure CN119888094A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, and in particular to a hairstyle simulation method based on image recognition. Background Art
[0002] With the rapid development of the Internet and mobile technology, the demand for personal image beautification and personalized services is growing. Hairstyle is an important part of personal image. More and more people hope to get more accurate and personalized suggestions and simulation experience when choosing a hairstyle. Traditional curling methods mainly rely on the operator's experience and subjective judgment, and lack accurate analysis and personalized adaptation of personal hair quality.
[0003] The patent document with publication number CN113191404A discloses a hairstyle migration model training method, a hairstyle migration method and related devices, wherein the hairstyle migration model training method includes: obtaining a sample hairstyle image and a sample reference hairstyle image; performing feature extraction and feature fusion on the sample hairstyle image and the sample reference hairstyle image to obtain a sample fusion feature image; performing feature restoration on the sample fusion feature image to obtain a sample migration hairstyle image; inputting the sample migration hairstyle image into an image discrimination model and a hairstyle prediction model to obtain a discrimination result and a hairstyle prediction result; based on the sample migration hairstyle image and the sample hairstyle image, as well as the hairstyle prediction result and the hairstyle in the sample reference hairstyle image, and the discrimination result, iteratively adjusting the parameters of the hairstyle migration model, the image discrimination model and the hairstyle prediction model until the hairstyle migration model, the image discrimination model and the hairstyle prediction model all converge.
[0004] This shows the following problem: in the prior art, the actual curly hairstyle is affected by the hair quality, and it is impossible to specifically determine and adjust the operating parameters actually required for the curling operation according to the different hair qualities of the users, resulting in poor curly hair effects. Summary of the invention
[0005] To this end, the present invention provides a hairstyle simulation method based on image recognition, which is used to simulate the user's hair and adaptively determine the curling parameters when curling based on the simulated curling image, so as to overcome the problem in the prior art that it is impossible to determine and adjust the operating parameters for the curling operation specifically according to the different hair qualities of the users, resulting in poor curling effects.
[0006] To achieve the above object, the present invention provides a hairstyle simulation method based on image recognition, comprising: Obtaining an original hair image of the user, and determining hair quality information based on the original hair image; The hair quality information is transmitted to a client, and the client performs hair simulation according to the hair quality information to obtain a three-dimensional hair image; Determine the curling parameters of the curling iron corresponding to the target hairstyle; Performing curly hair simulation on the three-dimensional hair image according to the determined curly hair parameters to obtain a curly hair image; Comparing the target hairstyle image with the curly hair image to obtain a curly hair fitting deviation index; determining whether the curl parameter needs to be corrected based on the curl fitting deviation index; When it is determined that the curly hair parameter needs to be corrected, correcting the curly hair parameter to obtain a corrected curly hair parameter; The curling parameters include curling temperature, curling time and curling gap; The curl fitting deviation index includes a first curl fitting deviation index and a second curl fitting deviation index.
[0007] Further, the determining whether the curly hair parameter needs to be corrected based on the curly hair fitting deviation index includes: comparing the first curl fitting deviation index with a first standard curl fitting deviation index to obtain a first comparison result; comparing the second curl fitting deviation index with a second standard curl fitting deviation index to obtain a second comparison result; It is determined whether the curl parameter needs to be corrected based on the first comparison result and the second comparison result.
[0008] Further, the determining whether the curly hair parameter needs to be corrected based on the first comparison result and the second comparison result includes: If the first comparison result is that the first curl fitting deviation index is greater than the first standard curl fitting deviation index and the second comparison result is that the second curl fitting deviation index is greater than the second standard curl fitting deviation index, it is determined that the curl parameter needs to be corrected.
[0009] Further, the modifying the curly hair parameter to obtain the modified curly hair parameter comprises: Determining the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result; Use the preset correction range to correct the curly hair parameters that need to be corrected; In the process of correcting the curly hair parameters, the curly hair image is corrected in real time according to the change of the curly hair parameters to obtain a corrected curly hair image; determining a corrected fitting offset index between the corrected curly hair image and the target hairstyle image in the process of correcting the curly hair parameters; determining a correction difference factor between the corrected fitting deviation index and the corresponding first standard curly hair fitting deviation index or second standard curly hair fitting deviation index during the correction of curly hair parameters; A modified curl parameter is determined according to the modified difference factor.
[0010] Further, the determining the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result includes: If the first curl fitting deviation index is greater than the first standard curl fitting deviation index, adjusting the curling temperature or adjusting the curling time; If the second curl fitting deviation index is greater than the second standard curl fitting deviation index, the curl gap is adjusted.
[0011] Further, determining the corrected curly hair parameter according to the corrected difference factor comprises: determining a change in a correction difference factor during the curly hair correction process, and if the correction difference factor gradually increases during the curly hair correction process, determining that the correction is invalid, and the correction curly hair parameter is the curly hair parameter; If the correction difference factor gradually decreases during the correction process, it is determined that the correction is effective, and the process curling parameters before the correction difference factor increases during the correction process are determined as the corrected curling parameters.
[0012] Furthermore, determining the hair quality information based on the original hair image includes: Preprocessing the original hair image to obtain a hair image to be processed; The pre-trained deep learning model is used to analyze the hair image to be processed to determine the hair quality information of the hair image to be processed.
[0013] Furthermore, the comparing the target hairstyle image with the curly hair image to obtain the curly hair fitting deviation index comprises: Acquire the hairstyle parameters of the curly hair image, where the hairstyle parameters include curl rate and curl length; A first curl fitting deviation index and a second curl fitting deviation index are determined according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle.
[0014] Further, determining a first curl fitting deviation index and a second curl fitting deviation index according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle comprises: determining a first curl fitting deviation index according to the curl ratio and a standard curl ratio of a target hairstyle; A second curl fitting deviation index is determined according to the curl length and a standard curl length of the target hairstyle.
[0015] Furthermore, it also includes: When it is determined that the curly hair parameters do not need to be corrected, displaying the curly hair parameters on the client; When it is determined that the curly hair parameters need to be corrected, the corrected curly hair parameters are displayed on the client.
[0016] Compared with the prior art, the beneficial effect of the present invention lies in that, by intelligently analyzing the original hair image through a deep learning model, the hair quality information of the user's hair can be accurately obtained, and a realistic three-dimensional hair map can be generated based on the information. According to the original hair images of different users, personalized hairstyles can be accurately simulated, and by comparing the target hairstyle with the simulated image, multi-angle and multi-parameter fine matching can be achieved. Through an adaptive parameter correction mechanism, key parameters such as curling temperature, time and gap can be dynamically adjusted according to the fitting offset index to maximize the approach to the target hairstyle. The client can preview the simulation results in real time, helping users to more intuitively understand the effects of curling using different curling parameters, determine the optimal curling parameters for the target hairstyle, and improve the curling efficiency of the curling iron.
[0017] Furthermore, by introducing a comparison method of the first curly hair fitting offset index and the second curly hair fitting offset index, a multi-dimensional and precise evaluation of the hairstyle simulation is achieved, which can analyze the difference between the simulated hairstyle and the target hairstyle more comprehensively and meticulously, thereby greatly improving the accuracy and reliability of the hairstyle matching. By strictly comparing the actual curly hair fitting offset index with the preset standard curly hair fitting offset index, the parameters that need to be adjusted can be quickly and accurately identified, thereby greatly improving the efficiency of the hairstyle simulation, reducing the time and cost of manual intervention, and significantly improving the scientificity and reliability of the hairstyle simulation.
[0018] Furthermore, by setting flexible judgment conditions, subtle deviations in hairstyle simulation can be captured in a timely manner, and parameters that need to be adjusted can be automatically identified and adjusted in a timely manner, thereby minimizing the difference between the simulated hairstyle and the target hairstyle, ensuring that the simulation results are as close to the target hairstyle as possible, greatly reducing the workload of manual intervention and improving the efficiency and accuracy of hairstyle simulation.
[0019] Furthermore, by accurately identifying the specific parameters that need to be corrected and updating the curly hair image in real time during the parameter correction process, the user can observe the impact of parameter adjustment on the hairstyle simulation effect in real time. This interactive optimization method greatly improves the user experience of hairstyle design. Through the preset correction amplitude and dynamic difference factor analysis, the parameter correction strategy can be flexibly adjusted according to the characteristics of different hair qualities and different hairstyles to adapt to various complex hairstyle simulation scenarios. By judging the correction difference factor, it ensures that the simulation result can continue to approach the target hairstyle, which significantly improves the accuracy and real-time performance of hairstyle simulation.
[0020] Furthermore, by establishing a precise mapping relationship between the curly hair fitting offset index and the specific curly hair parameters, precise control of the hairstyle simulation parameters is achieved. The offset indices of different dimensions directly correspond to specific parameter adjustment strategies, which improves the scientificity and pertinence of parameter correction. The corresponding curly hair parameters can be automatically identified and accurately adjusted according to the offset indices of different dimensions, which significantly reduces the cost of manual intervention, improves the efficiency of hairstyle simulation, and ensures that the simulation results are more comprehensive and accurate.
[0021] Furthermore, by dynamically monitoring the changing trend of the correction difference factor, the effect of the parameter correction can be evaluated in real time according to the real-time difference factor changes, which can effectively reduce meaningless parameter corrections and ensure that the optimal parameter combination closest to the target hairstyle can be found in the end. This not only saves computing resources, but also can more accurately lock the parameter configuration closest to the target hairstyle, making the hairstyle simulation process more efficient.
[0022] Furthermore, through professional preprocessing of the original hair images, including image enhancement and denoising, the quality and analyzability of the images are significantly improved, laying a solid data foundation for subsequent deep learning analysis. Hair quality information analysis is performed through pre-trained deep learning models, which can process hair images of different skin colors and hair qualities, accurately identify subtle features of the hair, making hair quality information analysis more comprehensive and accurate, and improving the accuracy of the simulation.
[0023] Furthermore, by obtaining the two key hairstyle parameters of curl rate and curl length, and strictly comparing the actual hairstyle parameters with the standard hairstyle parameters, the degree of deviation of the hairstyle simulation can be accurately quantified, providing a scientific and accurate data basis for subsequent parameter optimization, which helps to make the hairstyle simulation more accurate.
[0024] Furthermore, by simultaneously considering the two key parameters of curl rate and curl length, and accurately comparing the actual hairstyle parameters with the standard hairstyle parameters, the degree of deviation of the hairstyle simulation can be quantified more accurately, and the difference between the simulated hairstyle and the target hairstyle can be evaluated more comprehensively and meticulously, significantly improving the accuracy and reliability of the hairstyle simulation.
[0025] Furthermore, by displaying or correcting curling parameters in real time on the client, an intuitive and transparent hairstyle simulation interactive experience is provided to users. Users can understand the key parameters of hairstyle simulation in real time. By displaying detailed parameter information, users are provided with more references and guidance for hairstyle customization. Users can adjust the optimal curling parameters of the curling iron based on the displayed parameters to ensure the curling effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of a hairstyle simulation method based on image recognition according to an embodiment of the present invention; Figure 2 A flow chart of determining whether the curling parameters need to be corrected according to an embodiment of the present invention; Figure 3 A flow chart of obtaining and correcting curly hair parameters according to an embodiment of the present invention; Figure 4 This is a structural diagram of a curling iron used in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0028] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0029] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0030] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0031] See also Figure 1 ,like Figure 1 As shown, it is a flow chart of a hairstyle simulation method based on image recognition according to an embodiment of the present invention; Specifically, the hairstyle simulation method based on image recognition provided by the embodiment of the present invention includes: Obtaining an original hair image of the user, and determining hair quality information based on the original hair image; The hair quality information is transmitted to a client, and the client performs hair simulation according to the hair quality information to obtain a three-dimensional hair image; Determine the curling parameters of the curling iron corresponding to the target hairstyle; Performing curly hair simulation on the three-dimensional hair image according to the determined curly hair parameters to obtain a curly hair image; Comparing the target hairstyle image with the curly hair image to obtain a curly hair fitting deviation index; determining whether the curl parameter needs to be corrected based on the curl fitting deviation index; When it is determined that the curly hair parameter needs to be corrected, correcting the curly hair parameter to obtain a corrected curly hair parameter; The curling parameters include curling temperature, curling time and curling gap; The curl fitting deviation index includes a first curl fitting deviation index and a second curl fitting deviation index.
[0032] Specifically, the hair quality information is hair information that affects the curly hair effect, such as hair dryness, hair diameter, hair length, and hair hardness, and in this embodiment, it is hair dryness, hair diameter, hair length, and hair hardness. The client is a device for displaying simulated hairstyles, which can be a computer, a mobile phone, etc., as long as it can display the simulated hair image, and it is not limited here. Using three-dimensional graphics rendering technology, particle system simulation is performed based on hair quality information, hair physics simulation algorithm, curve interpolation reconstruction, and hair fiber structure simulation to build a hair model, and corresponding parameters are selected according to the target hairstyle. The target hairstyle is the curly hair effect hairstyle that the user determines to achieve, which can be selected in the client, and the corresponding curly hair parameters of the curling iron can also be determined in the client. The curly hair simulation uses the determined curly hair parameters of the target image to simulate the curling of each hair in the three-dimensional hair image, simulate the curly hair deformation of the hair to obtain a curly hair image, and the curly hair fitting deviation index is a parameter that characterizes the degree of difference between the hairstyle parameters of the simulated curly hair image after performing the curly hair simulation according to the three-dimensional hair image of the user and the standard hairstyle parameters of the target hairstyle.
[0033] Specifically, the user's hair image is obtained, and the corresponding hair quality information is determined according to the hairstyle image, and the hair quality information is transmitted to the client. The client simulates a three-dimensional hair image corresponding to the hair quality information, and performs a preliminary curling simulation on the three-dimensional hair image according to the curling parameters determined by the target hairstyle. However, the curling effect of curling with the same curling parameters may be different due to different hair quality information. The curling fitting offset index is determined by comparing the hairstyle parameters of the curling image after curling simulation with the standard parameters of the target hairstyle. According to the size of the curling fitting offset index, it is determined whether the curling parameters need to be corrected according to the user's hair quality information to obtain corrected curling parameters that are suitable for the user's hair quality information.
[0034] Specifically, through the deep learning model, the original hair image is intelligently analyzed to accurately obtain the hair quality information of the user's hair, and a realistic three-dimensional hair image is generated based on the information. According to the original hair images of different users, personalized hairstyles can be accurately simulated. By comparing the target hairstyle with the simulated image, multi-angle and multi-parameter fine matching can be achieved. Through the adaptive parameter correction mechanism, key parameters such as curling temperature, time and gap can be dynamically adjusted according to the fitting offset index to maximize the approach to the target hairstyle. The client can preview the simulation results in real time to help users more intuitively understand the effects of curling using different curling parameters, determine the optimal curling parameters for the target hairstyle, and improve the curling efficiency of the curling iron.
[0035] Please continue reading Figure 2 ,like Figure 2 As shown, it is a flow chart of determining whether the curling parameters need to be corrected according to an embodiment of the present invention; Specifically, determining whether the curly hair parameter needs to be corrected based on the curly hair fitting deviation index includes: comparing the first curl fitting deviation index with a first standard curl fitting deviation index to obtain a first comparison result; comparing the second curl fitting deviation index with a second standard curl fitting deviation index to obtain a second comparison result; It is determined whether the curl parameter needs to be corrected based on the first comparison result and the second comparison result.
[0036] Specifically, the first standard curl fitting deviation index and the second standard curl fitting deviation index are the degrees of difference in curl effects that are allowed to be most affected by hair quality information.
[0037] Specifically, by introducing the comparison method of the first curly hair fitting offset index and the second curly hair fitting offset index, a multi-dimensional and precise evaluation of the hairstyle simulation is achieved, which can analyze the difference between the simulated hairstyle and the target hairstyle more comprehensively and meticulously, greatly improving the accuracy and reliability of the hairstyle matching. By strictly comparing the actual curly hair fitting offset index with the preset standard curly hair fitting offset index, the parameters that need to be adjusted can be identified quickly and accurately, which greatly improves the efficiency of the hairstyle simulation, reduces the time and cost of manual intervention, and significantly improves the scientificity and reliability of the hairstyle simulation.
[0038] Specifically, determining whether the curly hair parameter needs to be corrected based on the first comparison result and the second comparison result includes: If the first comparison result is that the first curl fitting deviation index is greater than the first standard curl fitting deviation index and the second comparison result is that the second curl fitting deviation index is greater than the second standard curl fitting deviation index, it is determined that the curl parameter needs to be corrected.
[0039] Specifically, in the specific implementation process, the first standard curly hair fitting offset index threshold is 10%, the second standard curly hair fitting offset index threshold is 15%, the first curly hair fitting offset index of the curly hair image is 10%, the second curly hair fitting offset index is 20%, and the second curly hair fitting offset index is greater than the second standard curly hair fitting offset index, which means that the user's hair quality information has a greater impact on the curly hair effect, and the curly hair parameters need to be corrected.
[0040] Specifically, by setting flexible judgment conditions, subtle deviations in hairstyle simulation can be captured in a timely manner, and parameters that need to be adjusted can be automatically identified and adjusted in a timely manner, thereby minimizing the difference between the simulated hairstyle and the target hairstyle, ensuring that the simulation results are as close to the target hairstyle as possible, greatly reducing the workload of manual intervention and improving the efficiency and accuracy of hairstyle simulation.
[0041] Please continue reading Figure 3 ,like Figure 3 As shown, it is a flow chart of obtaining and correcting curly hair parameters according to an embodiment of the present invention; Specifically, the modifying the curly hair parameter to obtain the modified curly hair parameter comprises: Determining the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result; Use the preset correction range to correct the curly hair parameters that need to be corrected; In the process of correcting the curly hair parameters, the curly hair image is corrected in real time according to the change of the curly hair parameters to obtain a corrected curly hair image; determining a corrected fitting offset index between the corrected curly hair image and the target hairstyle image in the process of correcting the curly hair parameters; determining a correction difference factor between the corrected fitting deviation index and the corresponding first standard curly hair fitting deviation index or second standard curly hair fitting deviation index during the correction of curly hair parameters; A modified curl parameter is determined according to the modified difference factor.
[0042] Specifically, the correction amplitude is the amplitude of each correction adjustment of the curling temperature, the curling time, and the curling gap. The curling temperature correction amplitude is generally set at 5-10° C., the curling time correction amplitude is generally set at 1-5 seconds, and the curling gap correction amplitude is generally set at 0.5-2 mm. In this embodiment, the curling temperature correction amplitude is 8° C., the curling time correction amplitude is 1.5 seconds, and the curling gap correction amplitude is 1 mm. The correction fitting offset index of the curling image that gradually changes during the correction process is determined, and the correction difference factor of the correction fitting offset index is determined, so as to determine the corrected curling parameter when the correction difference factor is minimized.
[0043] Specifically, by accurately identifying the specific parameters that need to be corrected and updating the curly hair image in real time during the parameter correction process, users can observe the impact of parameter adjustment on the hairstyle simulation effect in real time. This interactive optimization method greatly improves the user experience of hairstyle design. Through preset correction amplitude and dynamic difference factor analysis, the parameter correction strategy can be flexibly adjusted according to the characteristics of different hair qualities and different hairstyles to adapt to various complex hairstyle simulation scenarios. By judging the correction difference factors, it ensures that the simulation results can continue to approach the target hairstyle, which significantly improves the accuracy and real-time performance of hairstyle simulation.
[0044] Specifically, determining the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result includes: If the first curl fitting deviation index is greater than the first standard curl fitting deviation index, adjusting the curling temperature or adjusting the curling time; If the second curl fitting deviation index is greater than the second standard curl fitting deviation index, the curl gap is adjusted.
[0045] Specifically, the curling temperature is the temperature of the curling rod. High temperature is suitable for more obvious curls, while low temperature is suitable for soft curls. The curling time parameter refers to the time the curling rod stays on the hair. The longer the time, the higher the curl. The curling gap refers to the gap between the curling rod and the curling part. The smaller the gap, the smaller the curl length.
[0046] Specifically, by establishing a precise mapping relationship between the curly hair fitting offset index and the specific curly hair parameters, precise control of the hairstyle simulation parameters is achieved. The offset indices of different dimensions directly correspond to specific parameter adjustment strategies, which improves the scientificity and pertinence of parameter correction. The corresponding curly hair parameters can be automatically identified and accurately adjusted according to the offset indices of different dimensions, which significantly reduces the cost of manual intervention, improves the efficiency of hairstyle simulation, and ensures that the simulation results are more comprehensive and accurate.
[0047] Specifically, determining the corrected curly hair parameter according to the corrected difference factor includes: determining a change in a correction difference factor during the curly hair correction process, and if the correction difference factor gradually increases during the curly hair correction process, determining that the correction is invalid, and the correction curly hair parameter is the curly hair parameter; If the correction difference factor gradually decreases during the correction process, it is determined that the correction is effective, and the process curling parameters before the correction difference factor increases during the correction process are determined as the corrected curling parameters.
[0048] During the specific implementation process, the second curl fitting offset index is 20%, which is greater than the second standard curl fitting offset index threshold of 15%, and the curl gap is adjusted. During the adjustment process, the correction fitting offset indexes for increasing and decreasing the curl gap according to the correction amplitude are 16% and 17% respectively, indicating that the correction difference factor gradually increases during the process of correcting the curl gap, indicating that the correction is invalid. Due to the user's hair quality information, the best effect that can be achieved by using this curling iron is the effect of curling using curling parameters, and the corrected curl parameters are still the curling parameters.
[0049] Specifically, by dynamically monitoring the changing trend of the corrected difference factor, the effect of the parameter correction can be evaluated in real time according to the real-time change of the difference factor, which can effectively reduce meaningless parameter corrections and ensure that the optimal parameter combination closest to the target hairstyle can be found in the end. This not only saves computing resources, but also can more accurately lock the parameter configuration closest to the target hairstyle, making the hairstyle simulation process more efficient.
[0050] Specifically, determining the hair quality information based on the original hair image includes: Preprocessing the original hair image, including image enhancement and denoising, to obtain a hair image to be processed; The pre-trained deep learning model is used to analyze the hair image to be processed to determine the hair quality information of the hair image to be processed.
[0051] Specifically, the hair images are enhanced by brightness adjustment, color balancing and other methods, which are not limited here, and the hair images are denoised by Gaussian filtering, median filtering and other methods, which are not limited here, so that the pre-trained deep learning model can more accurately identify and analyze the hair quality information. The deep learning model can be a convolutional neural network or other learning models, which are not limited here. The deep learning model for identifying hair quality information is trained by using several hair images with different hair quality information.
[0052] Specifically, through professional preprocessing of the original hair images, including image enhancement and denoising, the quality and analyzability of the images are significantly improved, laying a solid data foundation for subsequent deep learning analysis. Hair quality information analysis is performed through pre-trained deep learning models, which can process hair images of different skin colors and hair qualities, accurately identify subtle features of the hair, make hair quality information analysis more comprehensive and accurate, and improve the accuracy of the simulation.
[0053] Specifically, the comparing the target hairstyle image with the curly hair image to obtain the curly hair fitting deviation index includes: Acquire the hairstyle parameters of the curly hair image, where the hairstyle parameters include curl rate and curl length; A first curl fitting deviation index and a second curl fitting deviation index are determined according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle.
[0054] Specifically, the curl rate is the curl angle of the curled hair, and the curl length is the curl length of a section of the curled hair in the hairstyle.
[0055] Specifically, by obtaining the two key hairstyle parameters of curl rate and curl length, and strictly comparing the actual hairstyle parameters with the standard hairstyle parameters, the degree of deviation of the hairstyle simulation can be accurately quantified, providing a scientific and accurate data basis for subsequent parameter optimization, which helps to make the hairstyle simulation more accurate.
[0056] Specifically, determining the first curl fitting offset index and the second curl fitting offset index according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle includes: determining a first curl fitting deviation index according to the curl ratio and a standard curl ratio of a target hairstyle; A second curl fitting deviation index is determined according to the curl length and a standard curl length of the target hairstyle.
[0057] Specifically, the first curl fitting deviation index is the ratio of the absolute value of the difference between the curl rate and the standard curl rate to the standard curl rate, and the second curl fitting deviation index is the ratio of the absolute value of the difference between the curl length and the standard curl length to the standard curl length.
[0058] In a specific implementation process, the standard curl rate corresponding to the target hairstyle is 50 degrees, and the standard curl length is 10 cm. The curl rate of the curly hair image is 45 degrees, and the curl length is 8 cm. The first curly hair fitting offset index is |45-50| / 50=10%, and the second curly hair fitting offset index is |8-10| / 10=20%.
[0059] Specifically, by simultaneously considering the two key parameters of curl rate and curl length, and accurately comparing the actual hairstyle parameters with the standard hairstyle parameters, the degree of deviation of the hairstyle simulation can be quantified more accurately, and the difference between the simulated hairstyle and the target hairstyle can be evaluated more comprehensively and meticulously, significantly improving the accuracy and reliability of the hairstyle simulation.
[0060] Specifically, it also includes: When it is determined that the curly hair parameters do not need to be corrected, displaying the curly hair parameters on the client; When it is determined that the curly hair parameters need to be corrected, the corrected curly hair parameters are displayed on the client.
[0061] Specifically, when it is determined that the curling parameters do not need to be corrected, it is explained that the user's hair quality information has little influence on the curling effect, and curling can be performed according to the standard curling parameters of the target hairstyle. When it is determined that the curling parameters need to be corrected, it is explained that the user's hair quality information has a great influence on the curling effect, and after the corrected curling parameters personalized according to the user's hair quality information are determined to be the best corrected curling parameters for the user to obtain the target hairstyle effect, curling is performed according to the corrected curling parameters.
[0062] Specifically, by displaying or correcting curling parameters in real time on the client, an intuitive and transparent hairstyle simulation interactive experience is provided to users. Users can understand the key parameters of hairstyle simulation in real time. By displaying detailed parameter information, users are provided with more references and guidance for hairstyle customization. Users can adjust the optimal curling parameters of the curling iron based on the displayed parameters to ensure the curling effect.
[0063] Please continue reading Figure 4 ,like Figure 4 As shown, it is a structural diagram of a curling iron used in an embodiment of the present invention; In a specific application, a hairstyle simulation method based on image recognition in an embodiment of the present invention is applied to a curling iron, comprising an upper shell 1, a curling assembly 2, and a lower shell 3. The lower part of the curling assembly 2 is connected to the lower shell 3. When not in use, the curling assembly 2 is inside the upper shell 1. The power is turned on by pressing a power button 33, and the curling gap of the curling iron is adjusted by adjusting the dial button 31. Specifically, the curling gap can be adjusted to seven gears, corresponding to seven different sizes of curling gaps from 1.5mm to 10.5mm. Each time the curling gap is adjusted, the curling gap will change by 1.5mm. The temperature is increased or decreased by the temperature button 32, and each adjustment will adjust the curling temperature by 8°C.
[0064] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A hairstyle simulation method based on image recognition, characterized in that: include: Obtaining an original hair image of the user, and determining hair quality information based on the original hair image; The hair quality information is transmitted to a client, and the client performs hair simulation according to the hair quality information to obtain a three-dimensional hair image; Determine the curling parameters of the curling iron corresponding to the target hairstyle; Performing curly hair simulation on the three-dimensional hair image according to the determined curly hair parameters to obtain a curly hair image; Comparing the target hairstyle image with the curly hair image to obtain a curly hair fitting deviation index; determining whether the curl parameter needs to be corrected based on the curl fitting deviation index; When it is determined that the curly hair parameter needs to be corrected, correcting the curly hair parameter to obtain a corrected curly hair parameter; The curling parameters include curling temperature, curling time and curling gap; The curl fitting deviation index includes a first curl fitting deviation index and a second curl fitting deviation index.
2. The method for simulating hairstyle based on image recognition according to claim 1, characterized in that: The determining whether the curly hair parameter needs to be corrected based on the curly hair fitting deviation index comprises: comparing the first curl fitting deviation index with a first standard curl fitting deviation index to obtain a first comparison result; comparing the second curl fitting deviation index with a second standard curl fitting deviation index to obtain a second comparison result; It is determined whether the curl parameter needs to be corrected based on the first comparison result and the second comparison result.
3. The method for simulating hairstyle based on image recognition according to claim 2, characterized in that: The determining whether the curly hair parameter needs to be corrected based on the first comparison result and the second comparison result includes: If the first comparison result is that the first curl fitting deviation index is greater than the first standard curl fitting deviation index and the second comparison result is that the second curl fitting deviation index is greater than the second standard curl fitting deviation index, it is determined that the curl parameter needs to be corrected.
4. The method for simulating hairstyle based on image recognition according to claim 3, characterized in that: The modifying the curly hair parameter to obtain the modified curly hair parameter comprises: Determining the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result; Use the preset correction range to correct the curly hair parameters that need to be corrected; In the process of correcting the curly hair parameters, the curly hair image is corrected in real time according to the change of the curly hair parameters to obtain a corrected curly hair image; determining a corrected fitting offset index between the corrected curly hair image and the target hairstyle image in the process of correcting the curly hair parameters; determining a correction difference factor between the corrected fitting deviation index and the corresponding first standard curly hair fitting deviation index or second standard curly hair fitting deviation index during the correction of curly hair parameters; A modified curl parameter is determined according to the modified difference factor.
5. The method for simulating hairstyle based on image recognition according to claim 4, characterized in that: The determining of the curly hair parameter that needs to be corrected based on the first comparison result and the second comparison result includes: If the first curl fitting deviation index is greater than the first standard curl fitting deviation index, adjusting the curling temperature or adjusting the curling time; If the second curl fitting deviation index is greater than the second standard curl fitting deviation index, the curl gap is adjusted.
6. The method for simulating hairstyle based on image recognition according to claim 5, characterized in that: Determining the corrected curly hair parameter according to the corrected difference factor comprises: determining a change in a correction difference factor during the curly hair correction process, and if the correction difference factor gradually increases during the curly hair correction process, determining that the correction is invalid, and the correction curly hair parameter is the curly hair parameter; If the correction difference factor gradually decreases during the correction process, it is determined that the correction is effective, and the process curling parameters before the correction difference factor increases during the correction process are determined as the corrected curling parameters.
7. The method for simulating hairstyle based on image recognition according to claim 6, characterized in that: Determining the hair quality information based on the original hair image includes: Preprocessing the original hair image to obtain a hair image to be processed; The pre-trained deep learning model is used to analyze the hair image to be processed to determine the hair quality information of the hair image to be processed.
8. The method for simulating hairstyle based on image recognition according to claim 7, characterized in that: The step of comparing the target hairstyle image with the curly hair image to obtain the curly hair fitting deviation index comprises: Acquire the hairstyle parameters of the curly hair image, where the hairstyle parameters include curl rate and curl length; A first curl fitting deviation index and a second curl fitting deviation index are determined according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle.
9. The method for simulating hairstyle based on image recognition according to claim 8, characterized in that: The determining of the first curl fitting deviation index and the second curl fitting deviation index according to the hairstyle parameters and the standard hairstyle parameters of the target hairstyle comprises: determining a first curl fitting deviation index according to the curl ratio and a standard curl ratio of a target hairstyle; A second curl fitting deviation index is determined according to the curl length and a standard curl length of the target hairstyle.
10. The method for simulating hairstyle based on image recognition according to claim 9, characterized in that: Also includes: When it is determined that the curly hair parameters do not need to be corrected, displaying the curly hair parameters on the client; When it is determined that the curly hair parameters need to be corrected, the corrected curly hair parameters are displayed on the client.
Citation Information
Patent Citations
Hair style migration model training method, hair style migration method and related device
CN113191404A
Method and device for determining a straightness value of a hairstyle
US20190279389A1
Methods and systems for modelling and applying hairstyles
WO2025042295A1