Real-time virtual wig try-on method and device, electronic equipment and medium
The real-time virtual wig try-on method addresses the challenge of accurately previewing wig effects by using AI image generation and face replacement, enhancing shopping experience and reducing returns through realistic virtual try-on.
Patent Information
- Application Number
- CN202410658251.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-12-31
AI Technical Summary
Customers struggle to intuitively and accurately preview the wearing effect of wigs before purchasing, leading to high return rates and reduced satisfaction due to size or style mismatches.
A real-time virtual wig try-on method using AI image generation and face replacement technology to fuse customer facial images with wig model images, generating realistic virtual try-on effects by matching facial features and angles.
Enables customers to intuitively and accurately preview wig effects, reducing returns and enhancing shopping experience and satisfaction by providing personalized and realistic virtual try-on.
Smart Images

Figure CN119228627A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtual try-on technology, and in particular to a real-time virtual wig try-on method, device, electronic equipment and medium. Background Art
[0002] Real-time virtual wearable technology, as a hot topic in the e-commerce field in recent years, has been generally regarded as a technology with revolutionary potential. It allows users to view and experience the wearing effects of different products in real time through technical means without actually wearing the products. This innovation not only effectively solves the product adaptation problem of e-commerce platform users when shopping, but also significantly reduces the return rate caused by size or style mismatch, saving valuable time and cost for customers and manufacturers. For merchants, this means effectively reducing the size of customer service and logistics departments, reducing inventory costs, and enriching the display and attractiveness of products.
[0003] At present, real-time virtual wearable technology is mainly used for trying on products such as glasses, clothing and shoes. Since wigs are directly related to personal image, their trial-fitting effect is particularly important to customers. In traditional shopping channels, customers often find it difficult to accurately judge the actual effect of wigs before purchasing, which leads to high return rates and reduced customer satisfaction. Real-time virtual try-on technology can solve this problem. It allows customers to intuitively experience the effects of different styles of wigs in a virtual environment.
[0004] In the early stages, augmented reality (AR) technology is the main means to realize this concept. It shows great application potential in the virtual display and experience of wearable products. By superimposing computer-generated images on the user's real environment, AR technology provides a new way of interactive experience, greatly enriching the user's sensory experience and bringing unprecedented changes to the retail and e-commerce industries. However, it is worth noting that although AR technology has great development potential in the field of real-time virtual try-on, its application in the market is still relatively limited because AR requires proprietary equipment and is too costly.
[0005] At present, when trying on wigs, the wig wearing effect generated in a virtual environment is basically used, and the wearing effect is not actually demonstrated through the customer's specific facial structure. It is impossible for customers to preview the actual wearing effect of the wig more intuitively and accurately before purchasing, thereby improving the shopping experience and customer satisfaction. Summary of the invention
[0006] In order to solve the problem in the prior art that customers can no longer be provided with a more intuitive and accurate preview of the actual wearing effect of a wig before purchasing; the present invention provides a real-time virtual wig trying-on method, device, electronic equipment and medium for realizing the actual wig trying-on effect of customers in a virtual environment.
[0007] The present application is implemented through the following technical solutions, a real-time virtual wig fitting method, comprising:
[0008] Acquire multiple wig model images for each wig product; each wig model image represents a facial image of the wig model wearing the wig at one angle;
[0009] Acquire multiple facial images of the customer, and use the multiple facial images to extract the customer's feature information; wherein the angle of the customer's face in each facial image is the same as the angle of the model's face in the wig model image;
[0010] The customer's feature information is used to match the corresponding target wig model image; multiple facial images of the customer are fused with the matched corresponding target wig model image to obtain an image of the customer wearing the wig product.
[0011] Preferably, the method for obtaining multiple wig model images for each wig product includes:
[0012] Acquire a training set, wherein the training set includes a wig image set and an image set of models wearing wigs, wherein one wig image corresponds to multiple images of models wearing wigs, and one image of the model wearing wigs includes a facial angle of the model;
[0013] Preprocessing the training set, preprocessing each image in the acquired training set to obtain a completed training set;
[0014] Model training: using the processed training set to train the model and obtain a training model;
[0015] Generate a redrawn image, generate a wig model image using the training model, and redraw the produced wig model image to obtain a redrawn wig model image.
[0016] Preferably, the method for obtaining multiple facial images of a customer includes:
[0017] Acquire video data shot by a customer, wherein the video data includes facial images of the customer at multiple key angles;
[0018] Extract frames from the video data to obtain facial images of the customer at multiple key angles.
[0019] Preferably, the method for extracting the characteristic information of the customer includes:
[0020] Obtaining a face region in a face image; and performing key point detection on the face region to obtain key points in the face;
[0021] Calibrate the face image through the detected key points and extract the high-dimensional vector of the calibrated face image;
[0022] The high-dimensional vector obtained by using the face image is compared with the high-dimensional vector in the face feature library, or the customer feature information corresponding to the face image, wherein the customer feature information at least includes the customer's age, gender and race.
[0023] Preferably, the method of fusing multiple facial images of the customer with the corresponding target wig model images includes:
[0024] Obtaining the positions of facial key points of the face image and the matched target wig model image, wherein the facial key points include eyes, nose and mouth;
[0025] Obtain low-dimensional vectors of a face image and a target wig model image, and fuse the low-dimensional vector of the face image with the low-dimensional vector of the target wig model image to generate a new low-dimensional vector;
[0026] A fused image is generated by generating a new low-dimensional vector, wherein the fused image is an image of a customer wearing a wig product.
[0027] Preferably, the plurality of wig model images include images of the front, right side at 45 degrees, and left side at 45 degrees of the model's face.
[0028] A real-time virtual wig fitting device, comprising:
[0029] A wig model image acquisition module is used to acquire multiple wig model images for each wig product; each wig model image represents a facial image of the wig model wearing the wig at one angle;
[0030] The customer face image acquisition module is used to acquire multiple face images of the customer and extract the customer's feature information using the multiple face images; wherein the customer face angle in each face image is the same as the model face angle in the wig model image;
[0031] The image generation module uses the customer's feature information to match the corresponding target wig model image; multiple facial images of the customer are merged with the matched corresponding target wig model image to obtain an image of the customer wearing a wig product.
[0032] An electronic device, comprising:
[0033] one or more processors;
[0034] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the real-time virtual wig fitting method.
[0035] A computer readable medium stores a computer program, which implements the real-time virtual wig fitting method when executed by a processor.
[0036] The beneficial effects of this application are:
[0037] 1. Through real-time virtual try-on technology, customers can intuitively see the effects of wearing different styles of wigs without actually touching the products. This intuitive experience greatly reduces the number of returns and exchanges due to style mismatches or unsatisfactory expected effects, thereby increasing the success rate of purchases and user satisfaction; and customers can quickly choose a wig that suits them from a variety of styles, colors and lengths, and even experience the personalized effects brought by customized services;
[0038] 2. The facial image of the model wearing a wig is replaced with the facial image of the customer, so that the effect of the customer wearing a real wig is achieved in the virtual environment, reducing the dependence on physical wig samples, reducing the frequency of returns and the merchant's passenger transportation costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a real-time virtual wig fitting method according to an embodiment of the present invention;
[0041] Figure 2 is a block diagram of a real-time virtual wig fitting device according to an embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of the structure of the computer system of the electronic device in this embodiment;
[0043] Figure 4 It is a simulation diagram of the virtual wig trying on in this embodiment. DETAILED DESCRIPTION
[0044] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0045] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, systems, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0046] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0047] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0048] This embodiment is based on the technical foundation of virtual wig fitting, specifically, it is based on the technical foundation of artificial intelligence image generation. At present, artificial intelligence (AI) has made significant breakthroughs in the field of image generation, especially the rapid development of face-changing technology. Thanks to the progress of computer vision and deep learning, this technology has achieved remarkable achievements; face-changing technology, commonly known as face replacement or face fusion technology, can realistically map the facial features of one person to the face of another person to create a realistic video or image. There are many face-changing technology applications on the market, such as Reface and FaceSwap, which are widely used in entertainment, social media, advertising and other fields. For example, the Reface application allows users to upload photos and generate face-changing videos or images in just a few seconds, making face replacement quick and easy. This shows that face replacement technology has the ability to achieve real-time virtual try-on, and the degree of fit with the user's photos and the overall realism are extremely high;
[0049] This embodiment combines business experience and integrates technologies such as face replacement, image redrawing and Lora model training. It applies real-time virtual try-on technology to wig try-on technology for the first time, which not only expands the application scope of real-time virtual try-on, but also accurately solves the difficulties faced by customers when choosing wigs. In particular, considering that wigs are worn directly on the head and have a significant impact on personal image, the application demand and value of real-time virtual try-on technology in the wig industry far exceeds other types of wearable products, such as clothing, shoes, etc. With this technology, consumers can preview the actual wearing effect of wigs more intuitively and accurately before purchasing, which greatly improves the shopping experience and customer satisfaction.
[0050] In order to achieve the above technical effects, this embodiment Figure 1 A real-time virtual wig fitting method is provided, comprising:
[0051] S101 obtains multiple wig model images for each wig product; each wig model image represents a facial image of the wig model wearing a wig at an angle;
[0052] In one embodiment, obtaining multiple images of wig models for each wig product includes:
[0053] Obtaining a training set, wherein the training set includes a wig image set and an image set of models wearing wigs, wherein one wig image corresponds to multiple images of models wearing wigs, and one image of a model wearing a wig includes a facial angle of the model; when collecting wig data for the training set, the channels collected mainly include internal team data, publicly available images of models wearing wigs, and images generated by AI;
[0054] Training set preprocessing, preprocessing each image in the acquired training set to obtain the completed training set; during preprocessing, the collected image data is mainly resized, cropped and processed with super resolution, mainly to meet the requirements of later model training. Resizing, cropping and super resolution processing of image data are currently the most common processing methods for image data, and they will not be described in detail here;
[0055] Model training: The model of this embodiment adopts the Lora model. Before model training, appropriate model parameters are selected, and then the images in the training set are annotated and sorted. The images in the training set are annotated as input images and output images. Then, the input images and output images are simultaneously input into the model for training. After the model training is completed, the trained model is trained with the validation set again until the model converges.
[0056] After the training is completed, the image of the wig to be tried is input into the trained model to obtain an image of a model wearing the wig, wherein a plurality of images of the model wearing the wig are generated, each of which represents an image of a facial angle of a model; in this embodiment, images of at least three facial angles are generated, including an image of the front of the face, an image of 45 degrees to the right of the face, and an image of 45 degrees to the left of the face;
[0057] After the model image is generated, since the realistic image is not strong, the generated model image needs to be redrawn. In this embodiment, the redrawing of the model image includes local redrawing and image redrawing;
[0058] When partially redrawing the generated model image, the generated image is scaled using the local redrawing function of Staple Diffusion to mask the wig part, and the non-masked part is generated in combination with the trained Lora model to complete the partially redrawn image to obtain the first model image;
[0059] Redrawing the first model image obtained by using the image-generated-image technology to eliminate the unnatural feeling at the seam between the wig and the model, so as to make the image of the model wearing the wig more realistic and natural;
[0060] The Stab le Diffusion and image generation technology in this implementation is a commonly used AI painting generation tool, and its specific technology will not be described in detail here;
[0061] This embodiment pre-processes the collected training data, combines Lora model training, local redrawing and image-generated redrawing techniques, and finally generates a high-quality AI model image with a wig. The specific process is: first, collect and mix wig data from different sources; secondly, pre-process the data to meet the model training requirements; then train the Lora model, adjust parameters and annotate data; then use local redrawing technology to generate a wig fusion image; finally, through image-generated redrawing, eliminate unnatural details and generate a realistic result image.
[0062] These images show the real effect of the wig at different viewing angles, with every detail visible. This module ensures the diversity and realism of the generated images, laying the foundation for subsequent virtual try-ons.
[0063] S102. Acquire multiple facial images of the customer, and use the multiple facial images to extract the customer's characteristic information; wherein the angle of the customer's face in each facial image is the same as the angle of the model's face in the wig model image;
[0064] In one embodiment, the method for acquiring multiple face images includes:
[0065] Acquire video data shot by a customer, wherein the video data includes facial images of the customer at multiple key angles;
[0066] Extract frames from the video data to obtain facial images of the customer at multiple key angles.
[0067] Specifically, when the customer is preparing for a virtual try-on, first a short video of the customer is obtained through a mobile phone or computer camera. The short video includes facial images at different angles. The customer can also be reminded by voice to record the corresponding angle video. For example, when recording a video, a voice reminder can be issued, including, please face the camera directly, turn 45 degrees to the left, turn 45 degrees to the right, etc. to record the video. After the video recording is completed, the recorded video is frame-processed to obtain facial images at three key angles in the video (front, 45 degrees to the left, and 45 degrees to the right); prepare for subsequent face recognition and face-changing processing;
[0068] In another embodiment, after acquiring the facial image of the customer, it is necessary to extract the characteristic information of the customer based on the facial image. During the extraction, the facial detection and recognition algorithm DeepFace is mainly used for extraction.
[0069] The DeepFace algorithm is a face recognition system based on a deep convolutional neural network. When extracting, it is performed as follows:
[0070] Face detection, using algorithms such as Viola-Jones or deep learning models to locate the face area in the customer's face image, where algorithms such as Viola-Jones or deep learning models belong to face extraction technologies well known in the art, and the specific technologies are not described in detail here;
[0071] Face calibration, detecting the key points of the face. In this embodiment, the key points of the face include eyes, nose and lips. The detection method is implemented by a face key point detection network (Face A li gnment Network). After the detection is completed, the detected face is calibrated to unify the posture and size;
[0072] Face encoding: input the calibrated face image into a deep convolutional neural network to extract the deep features of the face, such as eyes, nose, and lips. The deep features are then represented by a high-dimensional vector to complete the encoding feature vector of the face.
[0073] Face recognition and classification, using the obtained face encoding feature vector to compare with the encoding feature vector in the face feature library of known identities, find the most similar code, thereby identifying the identity of the face, and classifying the face by attributes such as age, gender, and race; wherein the face feature library is a face feature library of known identities, this library includes the encoding feature vector corresponding to each face and the identification of the corresponding identity. When comparing the obtained face encoding feature vector with the encoding feature vector in the face feature library, the Euclidean distance or cosine similarity is used to calculate the similarity between the face feature vector and each face feature vector in the face feature library, and match the target face in the face feature library with the face recognition. Since the target face has a known identity, the age, gender, race and other categories corresponding to the face are obtained through the known identity of the target face.
[0074] Through the DeepFace algorithm, the module can accurately identify key feature information such as gender, age, and race of extracted facial images, laying the foundation for subsequent selection of the most matching template and face-changing processing.
[0075] S103. First, the obtained customer characteristic information is used to match the corresponding target wig model image; the specific method includes: based on the identified customer characteristic information (gender, age, race, etc.), a model wearing a wig that matches the customer characteristic information is matched, that is, the target wig model image;
[0076] Then, the customer's multiple face images are fused with the corresponding target wig model images to obtain images of the customer wearing the wig product.
[0077] This embodiment uses the Roop face-changing technology to replace the model's face with the customer's face. The Roop face-changing technology is a face conversion technology based on deep learning, which mainly includes the following steps:
[0078] (1) Face detection and key point location: using computer vision algorithms to detect faces in input images and locate facial feature points, such as eyes, nose, lips, etc. This technology mainly uses key point detectors to detect the feature points of the face;
[0079] (2) Face encoding: After completing the detection of facial key points, low-dimensional vector encoding is performed on the customer's face and the model's face in the target wig model image to capture the key features of the face.
[0080] (3) Face fusion: The customer's face coding vector is fused with the coding vector of the model's face in the standard wig model image to generate a new coding vector. When fusing and generating a new coding vector, a deep learning model such as an adversarial network is used to implement it. The fused coding vector has the target image of the customer's facial features.
[0081] (4) Face decoding: decoding the fused new coding vector to generate the final face-changing result image. When decoding, the method adopted in this embodiment is to use the decoder in the adversarial network to complete the decoding of the vector and obtain the image of the customer wearing the wig product. The algorithm uses deep learning models such as generative adversarial networks to learn the facial feature mapping relationship through a large amount of training data to ensure that the face-changing result is natural and realistic, and simulate the real wearing effect of the wig on the customer's face.
[0082] The technical solution adopted in this embodiment utilizes the integration of wig-wearing model generation technology, face recognition technology and face-changing technology, and finally realizes the real-time and realistic virtual try-on of wigs. Consumers can intuitively and accurately preview the wearing effect of the wig on their faces online without the need for the physical object, which greatly improves the shopping experience and decision-making convenience, and helps to improve customer satisfaction and purchase conversion rate.
[0083] When implementing, refer to Figure 4 As shown in the figure, the customer enters his own image in the lower left box, and the system matches the corresponding model image based on the image received from the customer, and then performs face fusion to obtain Figure 4 The three images on the middle right show the face being replaced and wearing a wig.
[0084] refer to Figure 2 This embodiment provides a real-time virtual wig fitting device, comprising:
[0085] The wig model image acquisition module 101 is used to acquire multiple wig model images for each wig product; each wig model image represents a facial image of the wig model wearing the wig at one angle;
[0086] The customer face image acquisition module 102 is used to acquire multiple face images of the customer and extract the customer's feature information using the multiple face images; wherein the customer face angle in each face image is the same as the model face angle in the wig model image;
[0087] The image generation module 103 uses the characteristic information of the customer to match the corresponding target wig model image; and fuses the multiple facial images of the customer with the matched corresponding target wig model image to obtain an image of the customer wearing the wig product.
[0088] In this embodiment, based on the above solution, the method of obtaining multiple wig model images for each wig product includes:
[0089] Acquire a training set, wherein the training set includes a wig image set and an image set of models wearing wigs, wherein one wig image corresponds to multiple images of models wearing wigs, and one image of the model wearing wigs includes a facial angle of the model;
[0090] Preprocessing the training set, preprocessing each image in the acquired training set to obtain a completed training set;
[0091] Model training: using the processed training set to train the model and obtain a training model;
[0092] Generate a redrawn image, generate a wig model image using the training model, and redraw the produced wig model image to obtain a redrawn wig model image.
[0093] In this embodiment, based on the above solution, the method for obtaining multiple facial images of a customer includes:
[0094] Acquire video data shot by a customer, wherein the video data includes facial images of the customer at multiple key angles;
[0095] Extract frames from the video data to obtain facial images of the customer at multiple key angles.
[0096] In this embodiment, based on the above solution, the method for extracting the characteristic information of the customer includes:
[0097] Obtaining a face region in a face image; and performing key point detection on the face region to obtain key points in the face;
[0098] Calibrate the face image through the detected key points and extract the high-dimensional vector of the calibrated face image;
[0099] The high-dimensional vector obtained by using the face image is compared with the high-dimensional vector in the face feature library, or the customer feature information corresponding to the face image, wherein the customer feature information at least includes the customer's age, gender and race.
[0100] In this embodiment, based on the above solution, the method of fusing multiple facial images of the customer with the corresponding target wig model images includes:
[0101] Obtaining the positions of facial key points of the face image and the matched target wig model image, wherein the facial key points include eyes, nose and mouth;
[0102] Obtain low-dimensional vectors of a face image and a target wig model image, and fuse the low-dimensional vector of the face image with the low-dimensional vector of the target wig model image to generate a new low-dimensional vector;
[0103] A fused image is generated by generating a new low-dimensional vector, wherein the fused image is an image of a customer wearing a wig product.
[0104] In this embodiment, based on the above solution, the plurality of wig model images include images of the front, right side at 45 degrees, and left side at 45 degrees of the model's face.
[0105] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0106] It should be noted that the computer system 400 of the electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0107] The computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the real-time virtual wig fitting method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 403. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through the bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.
[0108] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0109] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0110] It should be noted that the computer-readable medium shown in the embodiment of the present application is used to implement the real-time virtual wig fitting method; the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0111] The flowchart and block diagram in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0112] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0113] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0114] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0115] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0116] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0117] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0118] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A real-time virtual wig fitting method, characterized in that: include: Obtain multiple wig model images for each wig product; Each wig model image represents a facial image of the wig model wearing a wig at one angle; Acquire multiple facial images of the customer, and use the multiple facial images to extract the customer's feature information; wherein the angle of the customer's face in each facial image is the same as the angle of the model's face in the wig model image; The customer's feature information is used to match the corresponding target wig model image; multiple facial images of the customer are fused with the matched corresponding target wig model image to obtain an image of the customer wearing the wig product.
2. A real-time virtual wig fitting method according to claim 1, characterized in that; The method of obtaining multiple wig model images for each wig product includes: Acquire a training set, wherein the training set includes a wig image set and an image set of models wearing wigs, wherein one wig image corresponds to multiple images of models wearing wigs, and one image of the model wearing wigs includes a facial angle of the model; Training set preprocessing: preprocessing each image in the acquired training set to obtain a processed training set; Model training: using the processed training set to train the model and obtain a training model; Generate a redrawn image, generate a wig model image using the trained model, and redraw the produced wig model image to obtain the wig model image.
3. A real-time virtual wig fitting method according to claim 1, characterized in that: Methods for obtaining multiple facial images of customers include: Acquire video data shot by a customer, wherein the video data includes facial images of the customer at multiple key angles; Extract frames from the video data to obtain facial images of the customer at multiple key angles.
4. A real-time virtual wig fitting method according to claim 1 or 3, characterized in that: Methods for extracting customer feature information include: Obtaining a face region in a face image; and performing key point detection on the face region to obtain key points in the face; Calibrate the face image through the detected key points and extract the high-dimensional vector of the calibrated face image; The high-dimensional vector obtained by using the face image is compared with the high-dimensional vector in the face feature library, or the customer feature information corresponding to the face image, wherein the customer feature information at least includes the customer's age, gender and race.
5. A real-time virtual wig fitting method according to claim 1, characterized in that: The method of fusing multiple face images of the customer with the corresponding target wig model images includes: Obtaining the positions of facial key points of the face image and the matched target wig model image, wherein the facial key points include eyes, nose and mouth; Obtain low-dimensional vectors of a face image and a target wig model image, and fuse the low-dimensional vector of the face image with the low-dimensional vector of the target wig model image to generate a new low-dimensional vector; A fused image is generated by generating a new low-dimensional vector, wherein the fused image is an image of a customer wearing a wig product.
6. A real-time virtual wig fitting method according to claim 1, characterized in that: The plurality of wig model images include images of the front, right 45 degrees, and left 45 degrees of the model's face.
7. A real-time virtual wig fitting device, characterized in that: include: A wig model image acquisition module is used to acquire multiple wig model images for each wig product; Each wig model image represents a facial image of the wig model wearing a wig at one angle; The customer face image acquisition module is used to acquire multiple face images of the customer and extract the customer's feature information using the multiple face images; wherein the customer face angle in each face image is the same as the model face angle in the wig model image; The image generation module uses the customer's feature information to match the corresponding target wig model image; multiple facial images of the customer are merged with the matched target wig model image to obtain an image of the customer wearing the wig product.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the real-time virtual wig fitting method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the real-time virtual wig fitting method according to any one of claims 1 to 6 is implemented.
